No public description

PiperOrigin-RevId: 640182036
Change-Id: I4b1305a515ec68749eb64b0b4b5578191653b38d
diff --git a/cheriot/cheriot_top.cc b/cheriot/cheriot_top.cc
index 5beda12..90a2adb 100644
--- a/cheriot/cheriot_top.cc
+++ b/cheriot/cheriot_top.cc
@@ -393,6 +393,7 @@
       halted_ = false;
       halt_reason_ = *HaltReason::kNone;
       need_to_step_over_ = false;
+      pc = next_pc;
       continue;
     }
     break;
@@ -500,6 +501,7 @@
         // Reset the halt reason and continue;
         halted_ = false;
         halt_reason_ = *HaltReason::kNone;
+        pc = next_pc;
         continue;
       }
       break;
@@ -745,7 +747,8 @@
   if (address > state_->max_physical_address()) {
     return absl::InvalidArgumentError("Invalid memory address");
   }
-  length = std::min(length, state_->max_physical_address() - address + 1);
+  uint64_t length64 = static_cast<uint64_t>(length);
+  length = std::min(length64, state_->max_physical_address() - address + 1);
   auto *tag_db = db_factory_.Allocate<uint8_t>(length);
   state_->tagged_memory()->Load(address, nullptr, tag_db, nullptr, nullptr);
   std::memcpy(buf, tag_db->raw_ptr(), length);
@@ -762,7 +765,8 @@
   if (address > state_->max_physical_address()) {
     return absl::InvalidArgumentError("Invalid memory address");
   }
-  length = std::min(length, state_->max_physical_address() - address + 1);
+  uint64_t length64 = static_cast<uint64_t>(length);
+  length = std::min(length64, state_->max_physical_address() - address + 1);
   auto *db = db_factory_.Allocate(length);
   std::memcpy(db->raw_ptr(), buffer, length);
   // Store bypassing any watch points/semihosting.