From 266910c4346a24dff83ec01c7e1fa87eb938243f Mon Sep 17 00:00:00 2001
From: pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Date: Wed, 9 Jul 2008 15:31:50 +0000
Subject: [PATCH] Avoid decremented overflow.

---
 exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec.c b/exec.c
index 4f7a027..5b43172 100644
--- a/exec.c
+++ b/exec.c
@@ -1432,7 +1432,7 @@ void cpu_interrupt(CPUState *env, int mask)
        signals are used primarily to interrupt blocking syscalls.  */
 #else
     if (use_icount) {
-        env->icount_decr.u16.high = 0x8000;
+        env->icount_decr.u16.high = 0xffff;
 #ifndef CONFIG_USER_ONLY
         /* CPU_INTERRUPT_EXIT isn't a real interrupt.  It just means
            an async event happened and we need to process it.  */
--
libgit2 0.23.3