From 1c91618a5d1261facd10fcb4294a24ffbcf240e4 Mon Sep 17 00:00:00 2001 From: uz Date: Mon, 12 Mar 2012 08:20:20 +0000 Subject: [PATCH] Fixed a C99ism. git-svn-id: svn://svn.cc65.org/cc65/trunk@5614 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/sp65/palette.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sp65/palette.c b/src/sp65/palette.c index 01473e6dc..b407b365c 100644 --- a/src/sp65/palette.c +++ b/src/sp65/palette.c @@ -87,13 +87,16 @@ Palette* NewMonochromePalette (void) Palette* DupPalette (const Palette* P) /* Create a copy of a palette */ { + Palette* N; + + /* Allow to pass a NULL palette */ if (P == 0) { return 0; } /* Create a new palette */ - Palette* N = NewPalette (P->Count); + N = NewPalette (P->Count); /* Copy the palette data */ memcpy (N->Entries, P->Entries, P->Count * sizeof (P->Entries[0])); -- 2.39.5