about summary refs log tree commit diff stats
path: root/038new_text.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-26 11:27:13 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-26 11:27:13 -0700
commit0230a6cc0bf7fc78fe34242300e7a93498d97dd9 (patch)
tree1b5f16026522c3a57be8eaec7a179a17e15ddddd /038new_text.cc
parent3c261c4426144c9b6873779f6a3e49c41f8d1f45 (diff)
downloadmu-0230a6cc0bf7fc78fe34242300e7a93498d97dd9.tar.gz
3256
Bugfix in filesystem creation. I'm sure there are other fake-filesystem
bugs.
Diffstat (limited to '038new_text.cc')
-rw-r--r--038new_text.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/038new_text.cc b/038new_text.cc
index c7696a9b..416d2e15 100644
--- a/038new_text.cc
+++ b/038new_text.cc
@@ -40,8 +40,10 @@ int new_mu_string(const string& contents) {
   // initialize string
   int result = Current_routine->alloc;
   // initialize refcount
+  trace(9999, "mem") << "storing string refcount 0 in location " << Current_routine->alloc << end();
   put(Memory, Current_routine->alloc++, 0);
   // store length
+  trace(9999, "mem") << "storing string length " << string_length << " in location " << Current_routine->alloc << end();
   put(Memory, Current_routine->alloc++, string_length);
   int curr = 0;
   const char* raw_contents = contents.c_str();
@@ -49,6 +51,7 @@ int new_mu_string(const string& contents) {
     uint32_t curr_character;
     assert(curr < SIZE(contents));
     tb_utf8_char_to_unicode(&curr_character, &raw_contents[curr]);
+    trace(9999, "mem") << "storing string character " << curr_character << " in location " << Current_routine->alloc << end();
     put(Memory, Current_routine->alloc, curr_character);
     curr += tb_utf8_char_length(raw_contents[curr]);
     ++Current_routine->alloc;