From 0a28a945cf368af610ada56e51cef5c331fc114b Mon Sep 17 00:00:00 2001 From: arcum42 Date: Fri, 7 Aug 2009 01:12:16 +0000 Subject: [PATCH] After thinking about it, I'm reverting one of the changes I made in r1608 for the moment, though I may rewrite the whole function in the future... git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1609 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/Elfheader.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcsx2/Elfheader.cpp b/pcsx2/Elfheader.cpp index 4c73755414..d49688a4d4 100644 --- a/pcsx2/Elfheader.cpp +++ b/pcsx2/Elfheader.cpp @@ -186,8 +186,9 @@ static uint parseCommandLine( const char *filename ) //fill param 0; i.e. name of the program strcpy( (char*)&PS2MEM_BASE[ args_ptr ], p ); - // We only filled 256 chars above. Lets not loop for more then that. - for ( i = /*strlen(p) + 1 + */256, argc = 0; i > 0; i-- ) + // Looking closer, it does decrement args_ptr by strlen(p) + 1, so, while I'm not sure the filename should really be scanned over, + // I'll put it back to strlen(p) + 1 + 256 for the moment. + for ( i = strlen(p) + 1 + 256, argc = 0; i > 0; i-- ) { // Decrease i until arg_ptr + i points at a spot that is not a space or 0 (or i is 0). while (i && isEmpty(args_ptr + i )) { i--; }