1
0
mirror of https://github.com/ksherlock/iigs.git synced 2024-12-22 14:29:41 +00:00

fix some bugs

This commit is contained in:
Kelvin Sherlock 2015-08-05 09:24:11 -04:00
parent cb87444860
commit 830963c0a0

11
aaae.rb
View File

@ -37,15 +37,16 @@ def output_bytes(name, data)
tmp.each_byte {|b|
print " " if index == 0
printf("%02x, ", b)
printf("0x%02x, ", b)
index = index + 1
if index == 16
if index == 8
print "\n"
index = 0
end
}
print "\n" if index > 0
puts "0x00\n"
#print "\n" if index > 0
puts "};"
end
@ -66,10 +67,10 @@ def output_strings(name, data)
data.each {|x|
# escape \
x = x.gsub(/\\/, '\\')
x = x.gsub(/([\\"])/) {|m| '\\' + m }
# escape "
x = x.gsub(/"/, '\"')
#x = x.gsub(/"/, '\"')
# escape chars...
# unfortunately, \x doesn't have a length limit so