8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 10:00:38 +01:00

Fixed 2 assertions in DEV_BUILD reproted by Dmitry, dont affect releases

This commit is contained in:
AlexPeshkoff 2022-01-31 13:21:45 +03:00
parent 26f08f7f2e
commit 5bb2db6ea6
2 changed files with 9 additions and 5 deletions

View File

@ -1140,7 +1140,7 @@ void put_asciz( const att_type attribute, const TEXT* string)
// We can't honor operating systems that allow longer file names.
if (len >= MAX_FILE_NAME_SIZE)
{
BURP_print(true, 343, SafeArg() << int(attribute) << "put_asciz()" << (MAX_FILE_NAME_SIZE - 1));
BURP_print(false, 343, SafeArg() << int(attribute) << "put_asciz()" << (MAX_FILE_NAME_SIZE - 1));
// msg 343: text for attribute @1 is too large in @2, truncating to @3 bytes
len = MAX_FILE_NAME_SIZE - 1;
}

View File

@ -452,10 +452,14 @@ int gstat(Firebird::UtilSvc* uSvc)
const Switches::in_sw_tab_t* in_sw_tab = switches.findSwitch(str);
if (!in_sw_tab)
{
if (!str[1])
str = "-*NONE*";
dba_print(true, 20, SafeArg() << (str + 1)); // msg 20: unknown switch "%s"
print_help();
if (!tddba->uSvc->isService()) // normally service manager doesn't pass illegal switches
{
if (!str[1])
str = "-*NONE*";
dba_print(true, 20, SafeArg() << (str + 1)); // msg 20: unknown switch "%s"
print_help();
}
dba_error(1); // msg 1: found unknown switch
break; // redundant
}