Commit 2d9d4873 authored by stephena's avatar stephena
Browse files

Fixed bug with autoexec.stella debugger file not actually executing its

contents.  The file was being accessed and read, but the commands it contained
weren't being executed!  This bug appeared in April 2010, so it looks like
not many people are using this feature (or at least they're not reporting it).

Cleaned up a few compiler warnings in DebuggerParser class.

Bumped version # for beta release.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2254 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
parent e2c73626
......@@ -41,6 +41,9 @@
a bug whereby ROMs were saved in strange locations and couldn't later
be found.
* Fixed bug in automatically executing the debugger 'autoexec.stella'
file; any commands it contained weren't actually being executed.
* Zero-byte ROMs are no longer loaded and mis-detected as Supercharger
images.
......
......@@ -22,7 +22,7 @@
#include <cstdlib>
#define STELLA_VERSION "3.4.1_svn1"
#define STELLA_VERSION "3.4.1_beta1"
#define STELLA_BUILD atoi("$Rev$" + 6)
#endif
......@@ -139,12 +139,13 @@ string DebuggerParser::exec(const FilesystemNode& file)
ostringstream buf;
int count = 0;
char buffer[256];
string command;
while( !in.eof() )
{
if(!in.getline(buffer, 255))
if(!getline(in, command))
break;
run(command);
count++;
}
buf << "Executed " << debugger->valueToString(count) << " commands from \""
......@@ -433,7 +434,7 @@ bool DebuggerParser::validateArgs(int cmd)
while(*p != kARG_END_ARGS && *p != kARG_MULTI_BYTE)
{
count++;
*p++;
p++;
}
// Evil hack: some commands intentionally take multiple arguments
......@@ -497,7 +498,7 @@ bool DebuggerParser::validateArgs(int cmd)
break;
}
curCount++;
*p++;
p++;
} while(*p != kARG_END_ARGS && curCount < argRequiredCount);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment