Mercurial > hg > xemacs-beta
comparison src/sysdep.c @ 3648:3e7493e76dc7
[xemacs-hg @ 2006-11-01 20:25:48 by adrian]
fix for ffap crash on Windows (was: [Bug: 21.5-b27] [CRASH] (file-name-directory "1:"))
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2006-11-01 Adrian Aichner <adrian@xemacs.org>
* sysdep.c (wcslen): Check for NULL pointer.
* sysdep.c (strlwr): Ditto.
* nt.c (mswindows_getdcwd): Ditto (actual cause of reported
crash).
* intl-win32.c (wcscmp): Ditto.
* intl-win32.c (wcslen): Ditto.
* intl-win32.c (wcsncpy): Ditto.
* intl-win32.c (wcscpy): Ditto.
* intl-win32.c (wcsdup): Ditto.
* fileio.c (Ffile_name_directory): Return Qnil when
mswindows_getdcwd returns NULL working directory.
author | adrian |
---|---|
date | Wed, 01 Nov 2006 20:25:50 +0000 |
parents | 5eb04c84c7ae |
children | b3d7b8b98acf |
comparison
equal
deleted
inserted
replaced
3647:510e0d6cee7e | 3648:3e7493e76dc7 |
---|---|
3489 | 3489 |
3490 #ifndef HAVE_WCHAR_H | 3490 #ifndef HAVE_WCHAR_H |
3491 size_t | 3491 size_t |
3492 wcslen (const wchar_t *s) | 3492 wcslen (const wchar_t *s) |
3493 { | 3493 { |
3494 if (s == NULL) return NULL; | |
3494 const wchar_t *p = s; | 3495 const wchar_t *p = s; |
3495 | 3496 |
3496 while (*p++) | 3497 while (*p++) |
3497 ; | 3498 ; |
3498 | 3499 |
3506 | 3507 |
3507 #ifndef HAVE_STRLWR | 3508 #ifndef HAVE_STRLWR |
3508 char * | 3509 char * |
3509 strlwr (char *s) | 3510 strlwr (char *s) |
3510 { | 3511 { |
3512 if (s == NULL) return NULL; | |
3511 REGISTER char *c; | 3513 REGISTER char *c; |
3512 | 3514 |
3513 for (c = s; *c; c++) | 3515 for (c = s; *c; c++) |
3514 { | 3516 { |
3515 *c = tolower (*c); | 3517 *c = tolower (*c); |