From bbd0d0114c6e82dc9b661057fb118365115909f6 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Thu, 3 May 2012 22:46:04 +0000 Subject: [PATCH] Fix an error in previous commit. Zero warnings on Windows too (Mingw, gcc 4.4.1-TDM) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1946 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/buttons.c | 6 ++++-- src/readline.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/buttons.c b/src/buttons.c index 260c0037..7c9a31f4 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -3456,7 +3456,8 @@ void Save_picture(byte image) if (confirm) { - + T_Format * format; + old_cursor_shape=Cursor_shape; Hide_cursor(); Cursor_shape=CURSOR_SHAPE_HOURGLASS; @@ -3464,7 +3465,8 @@ void Save_picture(byte image) Save_image(&save_context); - if (!File_error && image && !Get_fileformat(save_context.Format)->Palette_only) + format=Get_fileformat(save_context.Format); + if (!File_error && image && !format->Palette_only && (Main_backups->Pages->Nb_layers==1 || format->Supports_layers)) { Main_image_is_modified=0; strcpy(Main_backups->Pages->Filename, save_context.File_name); diff --git a/src/readline.c b/src/readline.c index cf6f020d..ea1feb9b 100644 --- a/src/readline.c +++ b/src/readline.c @@ -249,6 +249,7 @@ char* getClipboard() CloseClipboard(); } } + return dst; #elif defined __HAIKU__ return haiku_get_clipboard(); #else