X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fclient%2Fio.c;h=27a0e0f46d623fc2b31be94c074a2c953d61becb;hb=bf8ae37ed027803ebbf0d71add8b1aff24a7896d;hp=c86ff843e38d2b41917d3e3da3722ad79b987ff1;hpb=e03020342a74aef143b1ec38c18966dac64181b5;p=plomrogue
diff --git a/src/client/io.c b/src/client/io.c
index c86ff84..27a0e0f 100644
--- a/src/client/io.c
+++ b/src/client/io.c
@@ -15,7 +15,7 @@
#include "../common/try_malloc.h" /* try_malloc() */
#include "../common/rexit.h" /* exit_trouble(), exit_err() */
#include "../common/readwrite.h" /* try_fopen(), try_fclose(), try_fgets(),
- * try_fgetc()
+ * try_fgetc(), textfile_width()
*/
#include "control.h" /* try_key() */
#include "map.h" /* map_center() */
@@ -193,10 +193,9 @@ static uint8_t read_world()
{
return 0;
}
- uint32_t linemax = textfile_sizes(file, NULL);
+ uint32_t linemax = textfile_width(file);
char * read_buf = try_malloc(linemax + 1, f_name);
world.turn = read_value_from_line(read_buf, linemax, file);
- world.player_score = read_value_from_line(read_buf, linemax, file);
world.player_lifepoints = read_value_from_line(read_buf, linemax, file);
read_inventory(read_buf, linemax, file);
world.player_pos.y = read_value_from_line(read_buf, linemax, file);