diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-03-13 19:42:30 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-03-13 20:13:55 -0700 |
commit | d1b8d5eeb230a0c4ee480c0d7d36a6663c73f3fd (patch) | |
tree | bfe137a1f4e2baaa470e1cb36c2ab61b3d6c0dba | |
parent | 3e53459aaff03e42ba4610b08fa35783873b65b4 (diff) | |
download | mu-d1b8d5eeb230a0c4ee480c0d7d36a6663c73f3fd.tar.gz |
2771 - fix for clang on 32-bit machines
Turns out that LLVM/Clang still doesn't support multiplying 64-bit numbers on a 32-bit platform. https://llvm.org/bugs/show_bug.cgi?id=14469 This is just a quick fix, because it turns out I don't have any integer multiplication anywhere else. In the long run I think I'm going to just drop 'long long int' in favor of 'int'. Overflow is less likely than this configuration on somebody's machine.
-rw-r--r-- | 082scenario_screen.cc | 4 | ||||
-rw-r--r-- | 085scenario_console.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/082scenario_screen.cc b/082scenario_screen.cc index 579d9b9a..560d0079 100644 --- a/082scenario_screen.cc +++ b/082scenario_screen.cc @@ -341,9 +341,9 @@ void dump_screen() { assert(!current_call().default_space); // not supported long long int screen_location = get_or_insert(Memory, SCREEN) + /*skip refcount*/1; int width_offset = find_element_name(get(Type_ordinal, "screen"), "num-columns", ""); - long long int screen_width = get_or_insert(Memory, screen_location+width_offset); + int screen_width = get_or_insert(Memory, screen_location+width_offset); int height_offset = find_element_name(get(Type_ordinal, "screen"), "num-rows", ""); - long long int screen_height = get_or_insert(Memory, screen_location+height_offset); + int screen_height = get_or_insert(Memory, screen_location+height_offset); int data_offset = find_element_name(get(Type_ordinal, "screen"), "data", ""); assert(data_offset >= 0); long long int screen_data_location = screen_location+data_offset; // type: address:shared:array:character diff --git a/085scenario_console.cc b/085scenario_console.cc index bba0769e..99b044fa 100644 --- a/085scenario_console.cc +++ b/085scenario_console.cc @@ -52,7 +52,7 @@ case ASSUME_CONSOLE: { istringstream in("[" + current_instruction().ingredients.at(0).name + "]"); recipe r; slurp_body(in, r); - long long int num_events = count_events(r); + int num_events = count_events(r); // initialize the events like in new-fake-console long long int size = /*space for refcount*/1 + /*space for length*/1 + num_events*size_of_event(); ensure_space(size); |