From: uz Date: Mon, 12 Mar 2012 08:20:20 +0000 (+0000) Subject: Fixed a C99ism. X-Git-Tag: V2.14~449 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1c91618a5d1261facd10fcb4294a24ffbcf240e4;p=cc65 Fixed a C99ism. git-svn-id: svn://svn.cc65.org/cc65/trunk@5614 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- 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]));