Commit bd4e84db authored by DailyShana's avatar DailyShana

name conflict

line 43
parent 4db73567
...@@ -63,23 +63,23 @@ int main(int argc, char* argv[]) { ...@@ -63,23 +63,23 @@ int main(int argc, char* argv[]) {
wchar_t* command = GetCommandLineW(); wchar_t* command = GetCommandLineW();
char buffer[2048]; char buffer[2048];
BufferIO::EncodeUTF8(command, buffer); BufferIO::EncodeUTF8(command, buffer);
char* p = buffer; char* ptr = buffer;
argc = 0; argc = 0;
int j = 0; int j = 0;
bool in_QM = false, in_TEXT = false, in_SPACE = true; bool in_QM = false, in_TEXT = false, in_SPACE = true;
while(*p) { while(*ptr) {
if(in_QM) { if(in_QM) {
if(*p == '\"') if(*ptr == '\"')
in_QM = false; in_QM = false;
else else
++j; ++j;
} else { } else {
switch(*p) { switch(*ptr) {
case '\"': { case '\"': {
in_QM = true; in_QM = true;
in_TEXT = true; in_TEXT = true;
if(in_SPACE) { if(in_SPACE) {
argv[argc] = p + 1; argv[argc] = ptr + 1;
j = 0; j = 0;
} }
in_SPACE = FALSE; in_SPACE = FALSE;
...@@ -100,7 +100,7 @@ int main(int argc, char* argv[]) { ...@@ -100,7 +100,7 @@ int main(int argc, char* argv[]) {
default: { default: {
in_TEXT = TRUE; in_TEXT = TRUE;
if(in_SPACE) { if(in_SPACE) {
argv[argc] = p; argv[argc] = ptr;
j = 1; j = 1;
} else } else
++j; ++j;
...@@ -109,7 +109,7 @@ int main(int argc, char* argv[]) { ...@@ -109,7 +109,7 @@ int main(int argc, char* argv[]) {
} }
} }
} }
++p; ++ptr;
} }
argv[argc][j] = '\0'; argv[argc][j] = '\0';
++argc; ++argc;
......
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