aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshane <shane@noemail.net>2009-04-15 14:36:25 +0000
committershane <shane@noemail.net>2009-04-15 14:36:25 +0000
commit7a8537b4a50ca9936e6d8df1b39ed9d981b44df9 (patch)
tree556cb0633fb24055886afacdcca5ed844e53dce3 /src
parentd3264c7cdfa04b6b7844e00a650987a224840463 (diff)
downloadsqlite-7a8537b4a50ca9936e6d8df1b39ed9d981b44df9.tar.gz
sqlite-7a8537b4a50ca9936e6d8df1b39ed9d981b44df9.zip
Fix access violation on WinCE platforms. Ticket #3804. (CVS 6509)
FossilOrigin-Name: e203ad400dd61431b3e6b8219eb5357b6ca06561
Diffstat (limited to 'src')
-rw-r--r--src/os_win.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/os_win.c b/src/os_win.c
index 8f705cf63..cb4c4ce3b 100644
--- a/src/os_win.c
+++ b/src/os_win.c
@@ -12,7 +12,7 @@
**
** This file contains code that is specific to windows.
**
-** $Id: os_win.c,v 1.154 2009/04/09 14:27:07 chw Exp $
+** $Id: os_win.c,v 1.155 2009/04/15 14:36:26 shane Exp $
*/
#include "sqliteInt.h"
#if SQLITE_OS_WIN /* This file is used for windows only */
@@ -1600,13 +1600,11 @@ static int getSectorSize(
void *zConverted = convertUtf8Filename(zFullpath);
if( zConverted ){
if( isNT() ){
- int i;
/* trim path to just drive reference */
WCHAR *p = zConverted;
- for(i=0;i<MAX_PATH;i++){
- if( p[i] == '\\' ){
- i++;
- p[i] = '\0';
+ for(;*p;p++){
+ if( *p == '\\' ){
+ *p = '\0';
break;
}
}
@@ -1617,13 +1615,11 @@ static int getSectorSize(
&dwDummy);
#if SQLITE_OS_WINCE==0
}else{
- int i;
/* trim path to just drive reference */
CHAR *p = (CHAR *)zConverted;
- for(i=0;i<MAX_PATH;i++){
- if( p[i] == '\\' ){
- i++;
- p[i] = '\0';
+ for(;*p;p++){
+ if( *p == '\\' ){
+ *p = '\0';
break;
}
}