From e216eae70a654d0861d67bf31cfaeed18edaa085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Sun, 17 Jul 2011 10:51:42 +0000 Subject: [PATCH] [RTL] - fix RtlDosSearchPath_U : do not alter filename while searching for file extension svn path=/trunk/; revision=52707 --- reactos/lib/rtl/path.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/lib/rtl/path.c b/reactos/lib/rtl/path.c index c945b107a92..065583b85e1 100644 --- a/reactos/lib/rtl/path.c +++ b/reactos/lib/rtl/path.c @@ -1115,6 +1115,7 @@ RtlDosSearchPath_U(IN PCWSTR Path, ULONG ExtensionLength, Length, FileNameLength, PathLength; UNICODE_STRING TempString; PWCHAR NewBuffer, BufferStart; + PCWSTR TempPtr; /* Check if this is an absolute path */ if (RtlDetermineDosPathNameType_U(FileName) != RtlPathTypeRelative) @@ -1131,7 +1132,8 @@ RtlDosSearchPath_U(IN PCWSTR Path, } /* Scan the filename */ - c = *FileName; + TempPtr = FileName; + c = *TempPtr; while (c) { /* Looking for an extension */ @@ -1143,7 +1145,7 @@ RtlDosSearchPath_U(IN PCWSTR Path, } /* Next character */ - c = *++FileName; + c = *++TempPtr; } /* Do we have an extension? */