about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-15 14:05:22 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-15 14:05:22 -0700
commit757dc3fd465b162ababdcb9ec097b4d01cb56cde (patch)
treee3a185948548a0029f05ff9edae2f913a1fb371f
parentb75d9d456cb36ad41ab735586473adbbf3444643 (diff)
downloadmu-757dc3fd465b162ababdcb9ec097b4d01cb56cde.tar.gz
3366
Small bugfix in error messages for scenarios: we're trying to use
read_mu_string() on an array of characters rather than an address to an
array of characters. So we need to pretend we have a refcount.
-rw-r--r--050scenario.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/050scenario.cc b/050scenario.cc
index ac60af3e..918aaf0c 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -410,7 +410,7 @@ void check_string(int address, const string& literal) {
   trace(9999, "run") << "checking string length at " << address << end();
   if (get_or_insert(Memory, address) != SIZE(literal)) {
     if (Current_scenario && !Scenario_testing_scenario)
-      raise << "\nF - " << Current_scenario->name << ": expected location '" << address << "' to contain length " << SIZE(literal) << " of string [" << literal << "] but saw " << no_scientific(get_or_insert(Memory, address)) << " (" << read_mu_string(address) << ")\n" << end();
+      raise << "\nF - " << Current_scenario->name << ": expected location '" << address << "' to contain length " << SIZE(literal) << " of string [" << literal << "] but saw " << no_scientific(get_or_insert(Memory, address)) << " (" << read_mu_string(address-/*fake refcount*/1) << ")\n" << end();
     else
       raise << "expected location '" << address << "' to contain length " << SIZE(literal) << " of string [" << literal << "] but saw " << no_scientific(get_or_insert(Memory, address)) << '\n' << end();
     if (!Scenario_testing_scenario) Passed = false;