mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
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.
This commit is contained in:
4
misc.c
4
misc.c
@ -412,7 +412,9 @@ char *button2label(int button)
|
|||||||
('a' <= button && button <= 'z') ||
|
('a' <= button && button <= 'z') ||
|
||||||
('0' <= button && button <= '9') )
|
('0' <= button && button <= '9') )
|
||||||
{
|
{
|
||||||
char str[2] = { button, '\0' };
|
char str[2];
|
||||||
|
str[0] = button;
|
||||||
|
str[1] = '\0';
|
||||||
return dupstr(str);
|
return dupstr(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user