mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:03:02 +01:00
On behalf of alexpeshkoff after sourceforge crash - Postfix for CORE-4811: strip single quotes, not making them keep case of ascii string, when used in DPB (connect/create database)
This commit is contained in:
parent
01de4144c4
commit
3fc04a9dd5
@ -1610,6 +1610,7 @@ const char* dpbItemUpper(const char* s, FB_SIZE_T l, Firebird::string& buf)
|
||||
if (l && (s[0] == '"' || s[0] == '\''))
|
||||
{
|
||||
const char end_quote = s[0];
|
||||
bool ascii = true;
|
||||
|
||||
// quoted string - strip quotes
|
||||
for (FB_SIZE_T i = 1; i < l; ++i)
|
||||
@ -1622,9 +1623,14 @@ const char* dpbItemUpper(const char* s, FB_SIZE_T l, Firebird::string& buf)
|
||||
// skipped the escape quote, continue processing
|
||||
}
|
||||
|
||||
if (s[i] & 0x80)
|
||||
ascii = false;
|
||||
buf += s[i];
|
||||
}
|
||||
|
||||
if (ascii && s[0] == '\'')
|
||||
buf.upper();
|
||||
|
||||
return buf.c_str();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user