diff Plugins/Samples/WebSkeleton/Framework/EmbedResources.py @ 1390:92da9e1c2daa

improvement of samples
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 29 May 2015 17:24:01 +0200
parents 3d76e26b3865
children b1291df2f780
line wrap: on
line diff
--- a/Plugins/Samples/WebSkeleton/Framework/EmbedResources.py	Fri May 29 15:31:46 2015 +0200
+++ b/Plugins/Samples/WebSkeleton/Framework/EmbedResources.py	Fri May 29 17:24:01 2015 +0200
@@ -210,6 +210,10 @@
         cpp.write("0x%02x" % c)
         pos += 1
 
+    # Zero-size array are disallowed, so we put one single void character in it.
+    if pos == 0:
+        cpp.write('  0')
+
     cpp.write('  };\n')
     cpp.write('    static const size_t resource%dSize = %d;\n' % (item['Index'], pos))