diff --git a/kbinxml.py b/kbinxml.py
index c3caba1..87c8ce8 100644
--- a/kbinxml.py
+++ b/kbinxml.py
@@ -67,13 +67,13 @@ class KBinXML():
def data_grab_auto(self):
size = self.dataBuf.get_s32()
- ret = self.dataBuf.get('b', size)
+ ret = self.dataBuf.get('B', size)
self.dataBuf.realign_reads()
return ret
def data_append_auto(self, data):
self.dataBuf.append_s32(len(data))
- self.dataBuf.append(data, 'b', len(data))
+ self.dataBuf.append(data, 'B', len(data))
self.dataBuf.realign_writes()
def data_grab_string(self):
diff --git a/test.py b/test.py
index 6b1b8bb..81ecbad 100644
--- a/test.py
+++ b/test.py
@@ -12,9 +12,9 @@ with open('testcases_out.kbin', 'rb') as f:
k = KBinXML(xml_in)
kbin = k.to_binary()
if kbin != expected_bin:
- with open('failed_test.bin', 'wb') as f:
+ with open('failed_test.kbin', 'wb') as f:
f.write(kbin)
- raise AssertionError('Binary output does not match, check failed_test.bin')
+ raise AssertionError('Binary output does not match, check failed_test.kbin')
else:
print('XML -> Binary correct!')
diff --git a/testcases.xml b/testcases.xml
index c7d7bb2..d4749cc 100644
--- a/testcases.xml
+++ b/testcases.xml
@@ -6,7 +6,7 @@
Hello, world!
- V@CX@}C@Ct
+ V@CX@}C@Ct
8 9 10
diff --git a/testcases_out.kbin b/testcases_out.kbin
index 31fdc48..f258d5c 100644
Binary files a/testcases_out.kbin and b/testcases_out.kbin differ
diff --git a/testcases_out.xml b/testcases_out.xml
index 0a65831..96bb430 100644
--- a/testcases_out.xml
+++ b/testcases_out.xml
@@ -2,7 +2,7 @@
127.0.0.1 192.168.0.1
Hello, world!
- ใทใใคในใใใคใใฏใคใ
+ ใทใใคในใใใคใใฏใคใ
8 9 10
12
deadbeef