From 5e020e0281704c59add80fc277dfb84c0055abb8 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sun, 27 Jun 2010 14:23:48 +0000 Subject: [PATCH] That's what trimspace is for. :) --- src/emu/devcpu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/emu/devcpu.c b/src/emu/devcpu.c index 2cc05357d54..0caebc29d70 100644 --- a/src/emu/devcpu.c +++ b/src/emu/devcpu.c @@ -317,10 +317,7 @@ void legacy_cpu_device::device_start() int colon = tempstr.chr(0, ':'); int length = tempstr.len() - colon - 1; - while (colon>0 && isspace(tempstr[colon-1])) - colon--; - - tempstr.substr(0, colon); + tempstr.substr(0, colon).trimspace(); astring formatstr; formatstr.printf("%%%ds", length);