Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontends/amiga/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdio.h>

#ifdef __amigaos4__
/* Custom StringView class */
Expand Down Expand Up @@ -1222,7 +1223,7 @@ static void ami_openscreen(void)
{
char *modeid = malloc(20);
id = screenmodereq->sm_DisplayID;
sprintf(modeid, "0x%lx", id);
snprintf(modeid, 20, "0x%lx", id);
nsoption_set_charp(screen_modeid, modeid);
ami_nsoption_write();
}
Expand Down
3 changes: 2 additions & 1 deletion frontends/amiga/gui_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

#include <proto/exec.h>
#include <proto/graphics.h>
Expand Down Expand Up @@ -1860,7 +1861,7 @@ static void ami_gui_opts_use(bool save)
if(id)
{
char *modeid = malloc(20);
sprintf(modeid,"0x%lx", id);
snprintf(modeid, 20, "0x%lx", id);
nsoption_set_charp(screen_modeid, modeid);
}

Expand Down