aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-04-13 23:42:53 +0000
committerdrh <drh@noemail.net>2011-04-13 23:42:53 +0000
commit5f2dfdbc23a19827bad014b4f7ea851d4b10f4c1 (patch)
treeb4297af2860f53bc15de6025423b88558c5aea68 /src
parent50990dbb2996ef4366b42a43b9854a22db2bd114 (diff)
downloadsqlite-5f2dfdbc23a19827bad014b4f7ea851d4b10f4c1.tar.gz
sqlite-5f2dfdbc23a19827bad014b4f7ea851d4b10f4c1.zip
Remove extra CR and NL characters from FormatMessage() generated error
messages in the windows VFS. FossilOrigin-Name: 8332949c28ac72890de82b49bc11f02064b2647d
Diffstat (limited to 'src')
-rw-r--r--src/os_win.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os_win.c b/src/os_win.c
index 29775b53b..e97c5ff08 100644
--- a/src/os_win.c
+++ b/src/os_win.c
@@ -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