home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Corrected broken if.
[plomrogue]
/
roguelike.c
diff --git
a/roguelike.c
b/roguelike.c
index ee5dbe48be76fa54e3e9f7cafd2993a0c13404d6..34f3c855da6c9d2927bfad84e73ff11fe207f4e7 100644
(file)
--- a/
roguelike.c
+++ b/
roguelike.c
@@
-262,7
+262,7
@@
void init_keybindings(struct World * world) {
c = getc(file);
while (EOF != c) {
if ('\n' == c) {
c = getc(file);
while (EOF != c) {
if ('\n' == c) {
- keybindings[keycount].name = calloc(commcount, sizeof(char));
+ keybindings[keycount].name = calloc(commcount
+ 1
, sizeof(char));
memcpy(keybindings[keycount].name, command, commcount);
keybindings[keycount].key = key;
keycount++;
memcpy(keybindings[keycount].name, command, commcount);
keybindings[keycount].key = key;
keycount++;