From b07c69403d8c18632ca2006481bc8371b799e0a0 Mon Sep 17 00:00:00 2001 From: Ulf Wohlers Date: Fri, 12 Dec 2003 19:51:20 +0000 Subject: [PATCH] limit value in CPU_SetSegGeneral to 16bit Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1490 --- src/cpu/cpu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpu/cpu.cpp b/src/cpu/cpu.cpp index 31f3da06..84d056e3 100644 --- a/src/cpu/cpu.cpp +++ b/src/cpu/cpu.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: cpu.cpp,v 1.43 2003-12-12 17:23:55 harekiet Exp $ */ +/* $Id: cpu.cpp,v 1.44 2003-12-12 19:51:20 finsterr Exp $ */ #include #include "dosbox.h" @@ -1108,6 +1108,7 @@ void CPU_VERW(Bitu selector) { bool CPU_SetSegGeneral(SegNames seg,Bitu value) { + value &= 0xffff; if (!cpu.pmode || (reg_flags & FLAG_VM)) { Segs.val[seg]=value; Segs.phys[seg]=value << 4;