~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/substr_functions/substr_functions.cc

  • Committer: Monty Taylor
  • Date: 2010-10-13 17:53:36 UTC
  • mto: This revision was merged to the branch mainline in revision 1845.
  • Revision ID: mordred@inaugust.com-20101013175336-amzhjftgztblvua5
Updated pandora-build files to version 0.161

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
      (args[1]->unsigned_flag && ((uint64_t) start > INT32_MAX)))
87
87
    return &my_empty_string;
88
88
 
89
 
  start= ((start < 0) ?
90
 
          static_cast<int64_t>(res->numchars() + start)
91
 
          : start - 1);
 
89
  start= ((start < 0) ? res->numchars() + start : start - 1);
92
90
  start= res->charpos((int) start);
93
91
  if ((start < 0) || ((uint) start + 1 > res->length()))
94
92
    return &my_empty_string;