From 53fb6d00d426f7d97097826a60237a4ce63ca43a Mon Sep 17 00:00:00 2001 From: stephena Date: Fri, 17 Jun 2005 18:17:15 +0000 Subject: [PATCH] Fixed problem with changing RAM locations and input longer than 2 hex digits. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@519 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/gui/ByteGridWidget.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stella/src/gui/ByteGridWidget.cxx b/stella/src/gui/ByteGridWidget.cxx index af022c1c2..e545647d6 100644 --- a/stella/src/gui/ByteGridWidget.cxx +++ b/stella/src/gui/ByteGridWidget.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: ByteGridWidget.cxx,v 1.4 2005-06-17 17:34:01 stephena Exp $ +// $Id: ByteGridWidget.cxx,v 1.5 2005-06-17 18:17:15 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -390,9 +390,8 @@ void ByteGridWidget::endEditMode() return; } - // Append a leading 0 when necessary - if(value < 16) // In hex, this is the largest single-digit value - _editString = "0" + _editString; + // Correctly format the data for viewing + _editString = Debugger::to_hex_8(value); _valueStringList[_selectedItem] = _editString; _valueList[_selectedItem] = value;