home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved and defined more precisely textfile_sizes().
[plomrogue]
/
src
/
map_objects.c
diff --git
a/src/map_objects.c
b/src/map_objects.c
index 8b84ac136fcd5a07589ebf591b92227fbed805d1..f623801d01114e2ab2e159f270c6e98175a9df0b 100644
(file)
--- a/
src/map_objects.c
+++ b/
src/map_objects.c
@@
-107,10
+107,10
@@
extern void init_map_object_defs(struct World * world, char * filename)
world->monster_def = 0;
struct ItemDef * * p_p_id = &world->item_def;
struct MonsterDef * * p_p_md = &world->monster_def;
world->monster_def = 0;
struct ItemDef * * p_p_id = &world->item_def;
struct MonsterDef * * p_p_md = &world->monster_def;
- char defline[linemax];
+ char defline[linemax
+ 1
];
char * line_p;
char * delim = " ";
char * line_p;
char * delim = " ";
- while (fgets(defline, linemax, file))
+ while (fgets(defline, linemax
+ 1
, file))
{
mod.next = 0;
mod.id = atoi(strtok(defline, delim));
{
mod.next = 0;
mod.id = atoi(strtok(defline, delim));