diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-05 05:51:17 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-05 08:56:15 -0500 |
| commit | f44bf73b4b80afe3e8d6da85ddec91734a3a60f0 (patch) | |
| tree | 591819add4a379568f585da2c99993cf23a42f11 /std | |
| parent | Allow empty return statements for void functions (diff) | |
| download | cup-f44bf73b4b80afe3e8d6da85ddec91734a3a60f0.tar.xz cup-f44bf73b4b80afe3e8d6da85ddec91734a3a60f0.zip | |
Some very minor fixes (look at message)
(1) Add support for escaped single quotes
(2) Fix `putu_buffer` in `std/common.cup`
Diffstat (limited to 'std')
| -rw-r--r-- | std/common.cup | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/std/common.cup b/std/common.cup index b97c43a..abd7e82 100644 --- a/std/common.cup +++ b/std/common.cup @@ -157,7 +157,8 @@ fn putu_buffer(n: int, buf: char*): int { if (i == 0) { buf[i] = '0'; i = i + 1; - } else { + } else if (i > 1) { + buf[i] = 0; strrev(buf); } return i; |