[poincare] Repair integer create layout

Change-Id: I05d1badc6b499b4aa4a989ddb686a88163ae6abb
This commit is contained in:
Émilie Feral
2017-09-26 11:58:41 +02:00
parent 5ef5410b6f
commit 59a4992a7d

View File

@@ -470,8 +470,8 @@ ExpressionLayout * Integer::privateCreateLayout(FloatDisplayMode floatDisplayMod
if (isEqualTo(Integer(0))) {
buffer[size++] = '0';
}
while (!d.remainder().isEqualTo(Integer(0)) &&
d.quotient().isEqualTo(Integer(0))) {
while (!(d.remainder().isEqualTo(Integer(0)) &&
d.quotient().isEqualTo(Integer(0)))) {
assert(size<255); //TODO: malloc an extra buffer
char c = char_from_digit(d.remainder().digit(0));
buffer[size++] = c;