From 0230a6cc0bf7fc78fe34242300e7a93498d97dd9 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 26 Aug 2016 11:27:13 -0700 Subject: 3256 Bugfix in filesystem creation. I'm sure there are other fake-filesystem bugs. --- 038new_text.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to '038new_text.cc') 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; -- cgit 1.4.1-2-gfad0