fixed use of wrong constant
authorHolger Schemel <holger.schemel@virtion.de>
Fri, 8 Nov 2024 20:52:33 +0000 (21:52 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Fri, 8 Nov 2024 16:53:03 +0000 (17:53 +0100)
src/editor.c
src/libgame/text.c
src/screens.c

index 97e77f6a3fd39b73c5211e0e825a4e0f24ff1ad0..1e02171453386a647e7b92d632b8da7671138acd 100644 (file)
@@ -11694,7 +11694,7 @@ static int PrintTextFromBuffer(char *text_buffer, int font_nr, int xpos, int ypo
 
 static int PrintTextFromFile(char *filename, int font_nr, int xpos, int ypos)
 {
-  char *text_buffer = GetTextBufferFromFile(filename, MAX_OUTPUT_LINESIZE);
+  char *text_buffer = GetTextBufferFromFile(filename, MAX_OUTPUT_LINES);
   int num_lines_printed = PrintTextFromBuffer(text_buffer, font_nr, xpos, ypos);
 
   checked_free(text_buffer);
index a5eb687c5bacfb633ef49b84daa2d0863d311c90..012436db02ac1b5724eb56b7cc8b6a33c4ae7bee 100644 (file)
@@ -748,7 +748,7 @@ struct WrappedTextInfo *GetWrappedTextFile(char *filename, int font_nr,
                                            int line_spacing, int mask_mode, boolean autowrap,
                                            boolean centered, boolean parse_comments)
 {
-  char *text_buffer = GetTextBufferFromFile(filename, MAX_OUTPUT_LINESIZE);
+  char *text_buffer = GetTextBufferFromFile(filename, MAX_OUTPUT_LINES);
   struct WrappedTextInfo *wrapped_text = GetWrappedText(text_buffer, font_nr,
                                                         line_length, cut_length, max_lines,
                                                         line_width, cut_width, max_height,
@@ -906,7 +906,7 @@ int DrawTextFile(int x, int y, char *filename, int font_nr,
                 int line_spacing, int mask_mode, boolean autowrap,
                 boolean centered, boolean parse_comments)
 {
-  char *text_buffer = GetTextBufferFromFile(filename, MAX_OUTPUT_LINESIZE);
+  char *text_buffer = GetTextBufferFromFile(filename, MAX_OUTPUT_LINES);
   int num_lines_printed = DrawTextBuffer(x, y, text_buffer, font_nr,
                                         line_length, cut_length, max_lines,
                                         line_width, cut_width, max_height,
index 6f1083f3f3838c185e60cf56420e9c6345952294..3be934856290d196aa8631eb0081e11488034385 100644 (file)
@@ -4175,7 +4175,7 @@ static void SetWrappedText_GenericScreen(struct TitleMessageInfo *tmi,
   char *filename = getInfoScreenFilename_Generic(screen_nr, use_global_screens);
   char *buffer   = getInfoScreenBuffer_Generic();
   char *raw_text = (filename != NULL ? // always prefer info text files over buffers
-                    GetTextBufferFromFile(filename, MAX_OUTPUT_LINESIZE) :
+                    GetTextBufferFromFile(filename, MAX_OUTPUT_LINES) :
                     getLatin1FromUTF8(buffer));
   int line_spacing = getMenuTextSpacing(menu.line_spacing_info[info_mode], tmi->font);