summaryrefslogtreecommitdiff
path: root/strings/decimal.c
diff options
context:
space:
mode:
Diffstat (limited to 'strings/decimal.c')
-rw-r--r--strings/decimal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/strings/decimal.c b/strings/decimal.c
index 2353a8aefce..c6898cd099f 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -928,6 +928,8 @@ internal_str2dec(const char *from, decimal_t *to, char **end, my_bool fixed)
error= decimal_shift(to, (int) exponent);
}
}
+ if (to->sign && decimal_is_zero(to))
+ to->sign= 0;
return error;
fatal_error: