From: Matthew Mondor Date: Wed, 25 Jun 2014 07:38:26 +0000 (+0000) Subject: Bugfix X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=3163b4e47cacba3e517ea256f61c391098c00d2c;p=mmondor.git Bugfix --- diff --git a/mmsoftware/util/file-to-c.c b/mmsoftware/util/file-to-c.c index 3eb9053..e443831 100644 --- a/mmsoftware/util/file-to-c.c +++ b/mmsoftware/util/file-to-c.c @@ -1,4 +1,4 @@ -/* $Id: file-to-c.c,v 1.1 2014/06/25 06:13:19 mmondor Exp $ */ +/* $Id: file-to-c.c,v 1.2 2014/06/25 07:38:26 mmondor Exp $ */ /* * Copyright (c) 2014, Matthew Mondor @@ -74,8 +74,8 @@ main(int argc, char **argv) #include \n\ #include \n\ \n\ -const uint8_t\tstatic_%s_data[] = {\n\ - ", symbol); +const uint8_t\tstatic_%s_data[%ld] = {\n\ + ", symbol, size); for (i = 0, count = 1; ; i++, count++) { uint8_t b; @@ -103,10 +103,10 @@ const size_t\tstatic_%s_size = %ld;\n\n", symbol, size); #ifndef _STATIC_%s_\n\ #define _STATIC_%s_\n\ \n\ -extern const uint8_t\t*static_%s_data;\n\ +extern const uint8_t\tstatic_%s_data[%ld];\n\ extern const size_t\tstatic_%s_size;\n\ \n\ -#endif\n\n", symbol2, symbol2, symbol, symbol); +#endif\n\n", symbol2, symbol2, symbol, size, symbol); (void) fclose(fht); exit(EXIT_SUCCESS);