Commit 5364d5b4 authored by unknown's avatar unknown

Fix for bug #628


sql/item_strfunc.cc:
  just silly mistake
  pos was set outside alloced space
parent 070f4fbb
...@@ -1482,7 +1482,7 @@ String *Item_func_format::val_str(String *str) ...@@ -1482,7 +1482,7 @@ String *Item_func_format::val_str(String *str)
str= copy_if_not_alloced(&tmp_str,str,length); str= copy_if_not_alloced(&tmp_str,str,length);
str->length(length); str->length(length);
tmp= (char*) str->ptr()+length - dec-1; tmp= (char*) str->ptr()+length - dec-1;
for (pos= (char*) str->ptr()+length ; pos != tmp; pos--) for (pos= (char*) str->ptr()+length-1; pos != tmp; pos--)
pos[0]= pos[-(int) diff]; pos[0]= pos[-(int) diff];
while (diff) while (diff)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment