mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:13:56 +00:00
wcmd: Increase maximum length of commands.
Increase maximum length of commands to 8192 bytes as on Windows XP. Add needed braces to a multi line "if" statement.
This commit is contained in:
parent
a229618ef1
commit
80e695a6a4
1 changed files with 10 additions and 8 deletions
|
@ -27,7 +27,8 @@ extern char quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
|
|||
extern BATCH_CONTEXT *context;
|
||||
extern DWORD errorlevel;
|
||||
|
||||
#define MAXSTRING 1024
|
||||
/* msdn specified max for Win XP */
|
||||
#define MAXSTRING 8192
|
||||
|
||||
/****************************************************************************
|
||||
* WCMD_batch
|
||||
|
@ -93,13 +94,14 @@ BATCH_CONTEXT *prev_context;
|
|||
*/
|
||||
|
||||
while (WCMD_fgets (string, sizeof(string), h)) {
|
||||
if (strlen(string) == MAXSTRING -1)
|
||||
WCMD_output_asis( "Line in Batch processing possible truncated. Using:\n");
|
||||
WCMD_output_asis( string);
|
||||
WCMD_output_asis( "\n");
|
||||
if (string[0] != ':') { /* Skip over labels */
|
||||
WCMD_batch_command (string);
|
||||
}
|
||||
if (strlen(string) == MAXSTRING -1) {
|
||||
WCMD_output_asis( "Line in Batch processing possibly truncated. Using:\n");
|
||||
WCMD_output_asis( string);
|
||||
WCMD_output_asis( "\n");
|
||||
}
|
||||
if (string[0] != ':') { /* Skip over labels */
|
||||
WCMD_batch_command (string);
|
||||
}
|
||||
}
|
||||
CloseHandle (h);
|
||||
|
||||
|
|
Loading…
Reference in a new issue