From 82c98dfa1bc15bb00b35b676cb9aff69a4719851 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 22 Aug 2010 12:36:56 +0000 Subject: [PATCH] Since previous fix made lot of issues, found better solution for this astring bool problem (no whatsnew) --- src/emu/debug/debugcpu.c | 2 +- src/lib/util/astring.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 52746397fa0..9b8b658f8f2 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -2753,7 +2753,7 @@ UINT32 device_debug::dasm_wrapped(astring &buffer, offs_t pc) // disassemble to our buffer buffer.expand(200); - return disassemble(buffer, pc, opbuf, argbuf); + return disassemble(buffer.text, pc, opbuf, argbuf); } diff --git a/src/lib/util/astring.h b/src/lib/util/astring.h index cb2f450e7fe..7ff236f7f0a 100644 --- a/src/lib/util/astring.h +++ b/src/lib/util/astring.h @@ -333,7 +333,7 @@ public: astring &reset() { return cpy(""); } astring &expand(int length) { astring_expand(this, length); return *this; } - operator char *() { return (this->text[0] != 0) ? this->text : NULL; } + operator bool() const { return this->text[0] != 0; } operator const char *() const { return astring_c(this); } const char *cstr() const { return astring_c(this); } int len() const { return astring_len(this); }