diff options
| author | Simon Tatham <anakin@pobox.com> | 2018-04-23 18:42:13 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2018-04-23 18:42:13 +0100 |
| commit | f04923abbcd676585548c5824262cecb47ba6d11 (patch) | |
| tree | eb0c0dd51ea0be83d5432f692fdcbc2aadd9c527 | |
| parent | 60a929a250cf4f7f87ac082e5705f9a838a7f8c8 (diff) | |
| download | puzzles-f04923abbcd676585548c5824262cecb47ba6d11.zip puzzles-f04923abbcd676585548c5824262cecb47ba6d11.tar.gz puzzles-f04923abbcd676585548c5824262cecb47ba6d11.tar.bz2 puzzles-f04923abbcd676585548c5824262cecb47ba6d11.tar.xz | |
Build fix: stop initialising an auto char array.
Checking with the standards, I think this is legal C99, but not legal
C89 - and we are compiling in C89 mode. Why _every_ version of gcc
didn't object, given all the warning and pedantry options, I'm not
sure, but one did, so I should fix it.
| -rw-r--r-- | misc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -412,7 +412,9 @@ char *button2label(int button) ('a' <= button && button <= 'z') || ('0' <= button && button <= '9') ) { - char str[2] = { button, '\0' }; + char str[2]; + str[0] = button; + str[1] = '\0'; return dupstr(str); } |