Author: cwittich Date: Wed Apr 15 08:36:50 2009 New Revision: 40514 URL: http://svn.reactos.org/svn/reactos?rev=40514&view=rev Log: check for ESC in the while loop otherwise we never reached the old check
Modified: trunk/tools/sysreg2/console.c Modified: trunk/tools/sysreg2/console.c URL: http://svn.reactos.org/svn/reactos/trunk/tools/sysreg2/console.c?rev=40514&r1=40513&r2=40514&view=diff ============================================================================== --- trunk/tools/sysreg2/console.c [iso-8859-1] (original) +++ trunk/tools/sysreg2/console.c [iso-8859-1] Wed Apr 15 08:36:50 2009 @@ -92,6 +92,13 @@ if(*bp == '\n') break; + if (fds[i].fd == STDIN_FILENO) + { + /* break on ESC */ + if (*bp == '\33') + goto cleanup; + } + ++bp; } @@ -105,13 +112,7 @@ *(++bp) = 0; /* Now check the output */ - if (fds[i].fd == STDIN_FILENO) - { - /* Check whether the user pressed ESC and cancel in that case */ - if (strchr(buf, '\33')) - goto cleanup; - } - else + if (fds[i].fd != STDIN_FILENO) { /* Check for "magic" sequences */ if (strstr(buf, "kdb:>"))