diff options
author | perepujal <perepujal> | 2010-06-01 22:34:24 (GMT) |
---|---|---|
committer | perepujal <perepujal> | 2010-06-01 22:34:24 (GMT) |
commit | 91c4ac70a6452d1514f333658c2f475353a35ef9 (patch) | |
tree | 867eb3b23e27f60b6d7cbadd4235385ccedc16c0 | |
parent | cd4918b2d3f125f519d064c519355c1a60e86bf5 (diff) |
Using fgets instead of getline.
-rw-r--r-- | src/tuxpaint.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/tuxpaint.c b/src/tuxpaint.c index c7545b2..62b1a1d 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -19232,7 +19232,6 @@ static void load_info_about_label_surface(FILE * lfi) int new_pos; int x, y, pix_size; Uint8 a; - size_t max_text; /* Clear label surface */ @@ -19314,11 +19313,8 @@ static void load_info_about_label_surface(FILE * lfi) fscanf(lfi, "%d\n", &new_node->save_cur_font); new_node->save_cur_font = 0; - max_text = 64; - new_node->save_font_type = NULL; - - getline(&new_node->save_font_type, &max_text, lfi); - + new_node->save_font_type = malloc(64); + fgets(new_node->save_font_type, 64, lfi); fscanf(lfi, "%d\n", &new_node->save_text_state); fscanf(lfi, "%u\n", &new_node->save_text_size); |