diff options
author | unknown <kent@mysql.com/kent-amd64.(none)> | 2007-09-28 22:35:48 +0200 |
---|---|---|
committer | unknown <kent@mysql.com/kent-amd64.(none)> | 2007-09-28 22:35:48 +0200 |
commit | 5c04a99e2afda8c6fddb2572cd6f9e975aa52238 (patch) | |
tree | 076937a143929f518e0223428cd176f58fe7f473 /strings | |
parent | 7a2bb241bd0a80303385ef251ccb422c99c33a0b (diff) | |
download | mariadb-git-5c04a99e2afda8c6fddb2572cd6f9e975aa52238.tar.gz |
ctype-simple.c:
Avoid undefined value when negating (bug#30069)
strings/ctype-simple.c:
Avoid undefined value when negating (bug#30069)
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-simple.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index ccdfb5936b7..0355803daa8 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -802,7 +802,7 @@ int my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), { if (val < 0) { - val= -val; + val= -(unsigned long int)val; *dst++= '-'; len--; sign= 1; @@ -838,7 +838,7 @@ int my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), { if (val < 0) { - val = -val; + val = -(ulonglong)val; *dst++= '-'; len--; sign= 1; |