summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/SConscript5
1 files changed, 2 insertions, 3 deletions
diff --git a/Sluift/SConscript b/Sluift/SConscript
index 5e0a030..a2b6748 100644
--- a/Sluift/SConscript
+++ b/Sluift/SConscript
@@ -72,11 +72,10 @@ elif env["SCONS_STAGE"] == "build" :
f = open(source[0].abspath, "r")
data = f.read()
f.close()
- data_bytes = bytearray(data)
f = open(target[0].abspath, "w")
f.write('#include <stddef.h>\n')
- f.write('const size_t ' + source[0].name.replace(".", "_") + "_size = " + str(len(data_bytes)) + ";\n")
- f.write('const char ' + source[0].name.replace(".", "_") + "[] = {" + ", ".join([str(b) for b in data_bytes]) + "};\n")
+ f.write('const size_t ' + source[0].name.replace(".", "_") + "_size = " + str(len(data)) + ";\n")
+ f.write('const char ' + source[0].name.replace(".", "_") + "[] = {" + ", ".join([str(ord(c)) for c in data]) + "};\n")
f.close()
sluift_env.Command("core.c", ["core.lua"], env.Action(generate_embedded_lua, cmdstr="$GENCOMSTR"))