Skip to content

Commit

Permalink
Merge pull request #1003 from eco/complexexp-tochars-mistake
Browse files Browse the repository at this point in the history
ComplexExp::toChars fills wrong buffers on non-GDC
  • Loading branch information
WalterBright committed Jun 15, 2012
2 parents a5587d1 + 71684d1 commit a587ae5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/expression.c
Expand Up @@ -2528,8 +2528,8 @@ char *ComplexExp::toChars()
creall(value).format(buf1, sizeof(buf1));
cimagl(value).format(buf2, sizeof(buf2));
#else
ld_sprint(buffer, 'g', creall(value));
ld_sprint(buffer, 'g', cimagl(value));
ld_sprint(buf1, 'g', creall(value));
ld_sprint(buf2, 'g', cimagl(value));
#endif
sprintf(buffer, "(%s+%si)", buf1, buf2);
assert(strlen(buffer) < sizeof(buffer));
Expand Down

0 comments on commit a587ae5

Please sign in to comment.