mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Remove extra CR and NL characters from FormatMessage() generated error
messages in the windows VFS. FossilOrigin-Name: 8332949c28ac72890de82b49bc11f02064b2647d
This commit is contained in:
@@ -385,12 +385,15 @@ static int winLogErrorAtLine(
|
||||
int iLine /* Source line number where error occurred */
|
||||
){
|
||||
char zMsg[500]; /* Human readable error text */
|
||||
int i; /* Loop counter */
|
||||
DWORD iErrno = GetLastError(); /* Error code */
|
||||
|
||||
zMsg[0] = 0;
|
||||
getLastErrorMsg(sizeof(zMsg), zMsg);
|
||||
assert( errcode!=SQLITE_OK );
|
||||
if( zPath==0 ) zPath = "";
|
||||
for(i=0; zMsg[i] && zMsg[i]!='\r' && zMsg[i]!='\n'; i++){}
|
||||
zMsg[i] = 0;
|
||||
sqlite3_log(errcode,
|
||||
"os_win.c:%d: (%d) %s(%s) - %s",
|
||||
iLine, iErrno, zFunc, zPath, zMsg
|
||||
|
||||
Reference in New Issue
Block a user