From: Holger Schemel Date: Fri, 8 Nov 2024 20:52:33 +0000 (+0100) Subject: fixed use of wrong constant X-Git-Tag: 4.4.0.0-test-4~71 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a9ae13ad8d22ee0f34af375d2a46984bd38535fa;p=rocksndiamonds.git fixed use of wrong constant --- diff --git a/src/editor.c b/src/editor.c index 97e77f6a..1e021714 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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); diff --git a/src/libgame/text.c b/src/libgame/text.c index a5eb687c..012436db 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -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, diff --git a/src/screens.c b/src/screens.c index 6f1083f3..3be93485 100644 --- a/src/screens.c +++ b/src/screens.c @@ -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);