mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 12:40:33 +00:00
Fixed another silly bug.
svn path=/trunk/; revision=3015
This commit is contained in:
parent
51fddda8d4
commit
cf6fb9b64c
2 changed files with 10 additions and 9 deletions
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dos8dot3.c,v 1.2 2002/06/06 16:17:09 ekohl Exp $
|
||||
/* $Id: dos8dot3.c,v 1.3 2002/06/06 18:57:55 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -105,11 +105,9 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
|
|||
NameBuffer[NameLength++] = RtlUpcaseUnicodeChar(Name->Buffer[i]);
|
||||
}
|
||||
}
|
||||
|
||||
DPRINT("NameBuffer: '%.08S'\n", NameBuffer);
|
||||
DPRINT("NameLength: %hu\n", NameLength);
|
||||
|
||||
|
||||
/* Copy extension (4 valid characters max) */
|
||||
if (DotPos < StrLength)
|
||||
{
|
||||
|
@ -125,13 +123,15 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
|
|||
DPRINT("ExtBuffer: '%.04S'\n", ExtBuffer);
|
||||
DPRINT("ExtLength: %hu\n", ExtLength);
|
||||
|
||||
/* Determine next index */
|
||||
CurrentIndex = Context->LastIndexValue;
|
||||
CopyLength = min(NameLength, (CurrentIndex < 10) ? 6 : 5);
|
||||
|
||||
if ((Context->NameLength == CopyLength) &&
|
||||
(wcsncmp(Context->NameBuffer, NameBuffer, CopyLength) == 0) &&
|
||||
(Context->ExtensionLength == ExtLength) &&
|
||||
(wcsncmp(Context->ExtensionBuffer, ExtBuffer, ExtLength) == 0))
|
||||
CurrentIndex = Context->LastIndexValue + 1;
|
||||
CurrentIndex++;
|
||||
else
|
||||
CurrentIndex = 1;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dos8dot3.c,v 1.2 2002/06/06 16:17:26 ekohl Exp $
|
||||
/* $Id: dos8dot3.c,v 1.3 2002/06/06 18:59:50 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -121,12 +121,15 @@ RtlGenerate8dot3Name(IN PUNICODE_STRING Name,
|
|||
DPRINT("ExtLength: %hu\n", ExtLength);
|
||||
|
||||
/* Determine next index */
|
||||
CurrentIndex = Context->LastIndexValue;
|
||||
CopyLength = min(NameLength, (CurrentIndex < 10) ? 6 : 5);
|
||||
DPRINT("CopyLength: %hu\n", CopyLength);
|
||||
|
||||
if ((Context->NameLength == CopyLength) &&
|
||||
(wcsncmp(Context->NameBuffer, NameBuffer, CopyLength) == 0) &&
|
||||
(Context->ExtensionLength == ExtLength) &&
|
||||
(wcsncmp(Context->ExtensionBuffer, ExtBuffer, ExtLength) == 0))
|
||||
CurrentIndex = Context->LastIndexValue + 1;
|
||||
CurrentIndex++;
|
||||
else
|
||||
CurrentIndex = 1;
|
||||
DPRINT("CurrentIndex: %hu\n", CurrentIndex);
|
||||
|
@ -243,6 +246,4 @@ RtlIsNameLegalDOS8Dot3(IN PUNICODE_STRING UnicodeName,
|
|||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* EOF */
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue