Skip to content

Commit 5ffb550

Browse files
committed
another fix, we need to set the result before we return it (fix TurboC build)
1 parent 5f3e059 commit 5ffb550

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎kernel/newstuff.c‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,13 @@ COUNT truename(const char FAR * src, char * dest, COUNT mode)
266266
if (src0 == '\0')
267267
return DE_FILENOTFND;
268268

269+
/* Was a drive letter provided? If not then use current drive */
270+
if (src[1] == ':')
271+
result = drLetterToNr(DosUpFChar(src0));
272+
else
273+
result = default_drive;
274+
275+
/* check for network'd device or path */
269276
if (src0 == '\\' && src[1] == '\\') {
270277
const char FAR *unc_src = src;
271278
/* Flag UNC paths and short circuit processing. Set current LDT */
@@ -312,12 +319,6 @@ COUNT truename(const char FAR * src, char * dest, COUNT mode)
312319

313320
/* Redirector interface failed (or skipped) --> proceed with local mapper */
314321

315-
/* Was a drive letter provided? If not then use current drive */
316-
if (src[1] == ':')
317-
result = drLetterToNr(DosUpFChar(src0));
318-
else
319-
result = default_drive;
320-
321322
dhp = IsDevice(src);
322323

323324
/* Note: [older] redirectors may not provide Int 2Fh API and instead simply wrap Int 21h calls

0 commit comments

Comments
 (0)