~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/left.cc

Merged Nathan from lp:~nlws/drizzle/fix-string-c-ptr-overrun

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <drizzled/server_includes.h>
21
21
#include CSTDINT_H
22
 
#include <drizzled/functions/str/left.h>
 
22
#include <drizzled/function/str/left.h>
23
23
 
24
24
String *Item_func_left::val_str(String *str)
25
25
{
29
29
  /* must be int64_t to avoid truncation */
30
30
  int64_t length= args[1]->val_int();
31
31
  uint32_t char_pos;
32
 
  
 
32
 
33
33
  if ((null_value=(args[0]->null_value || args[1]->null_value)))
34
34
    return 0;
35
35