Skip to content

Commit

Permalink
Merge pull request #3134 from yebblies/issue3029
Browse files Browse the repository at this point in the history
Remove 'awful hack' introduced when fixing issue 3029
  • Loading branch information
WalterBright committed Jan 24, 2014
2 parents 452f29d + 24ae9f8 commit 5331490
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/expression.c
Expand Up @@ -2892,18 +2892,7 @@ void IntegerExp::toMangleBuffer(OutBuffer *buf)
if ((sinteger_t)value < 0)
buf->printf("N%lld", -value);
else
{
/* This is an awful hack to maintain backwards compatibility.
* There really always should be an 'i' before a number, but
* there wasn't in earlier implementations, so to maintain
* backwards compatibility it is only done if necessary to disambiguate.
* See bugzilla 3029
*/
if (buf->offset > 0 && isdigit(buf->data[buf->offset - 1]))
buf->writeByte('i');

buf->printf("%lld", value);
}
buf->printf("i%lld", value);
}

/******************************** ErrorExp **************************/
Expand Down

0 comments on commit 5331490

Please sign in to comment.