Commit 5c04a99e authored by unknown's avatar unknown

ctype-simple.c:

  Avoid undefined value when negating (bug#30069)


strings/ctype-simple.c:
  Avoid undefined value when negating (bug#30069)
parent 7a2bb241
...@@ -802,7 +802,7 @@ int my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), ...@@ -802,7 +802,7 @@ int my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
{ {
if (val < 0) if (val < 0)
{ {
val= -val; val= -(unsigned long int)val;
*dst++= '-'; *dst++= '-';
len--; len--;
sign= 1; sign= 1;
...@@ -838,7 +838,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), ...@@ -838,7 +838,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
{ {
if (val < 0) if (val < 0)
{ {
val = -val; val = -(ulonglong)val;
*dst++= '-'; *dst++= '-';
len--; len--;
sign= 1; sign= 1;
......
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