fixed 5.01 can be type in calc it did remove the zero so the result was 5.1

See issue #2019 for more details.

svn path=/trunk/; revision=25729
This commit is contained in:
Magnus Olsen 2007-02-05 16:34:29 +00:00
parent 5e7eb24549
commit bc9d01a54d

View file

@ -2882,16 +2882,16 @@ void calc_buffer_format(CALC *calc) {
MessageBeep(0);
}
if (point) {
p = calc->buffer;
n = _tcslen(p) - 1;
while (*(p+n) &&
*(p+n) != TEXT('.') &&
*(p+n) == TEXT('0')) {
calc->buffer[n] = TEXT('\0');
n--;
}
}
//if (point) {
// p = calc->buffer;
// n = _tcslen(p) - 1;
// while (*(p+n) &&
// *(p+n) != TEXT('.') &&
// *(p+n) == TEXT('0')) {
// calc->buffer[n] = TEXT('\0');
// n--;
// }
//}
// remove leading zeros