[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: PATCH: temp file fixes
From: Gregg Mattinson <gm138242 () scot ! canada ! sun ! com>
Date: 2002-07-26 12:20:14
[Download RAW message or body]
>+ xstart = tmpfn+strlen(tmpfn);
>+ while ((xstart > tmpfn) && (*xstart == 'X'))
>+ xstart--;
Marcus, the chunk of code above looks slightly wrong to me. Shouldn't it be:
xstart = tmpfn + strlen(tmpfn) - 1;
Here's why:
If tmpfn is "X", then strlen(tmpfn) = 1. Hence, xstart will point to the '\0'
at the end of the string, and hence the loop will never be run.
Other than that, your patch looks great.
Gregg Mattinson
Co-op Developer
Sun Microsystems of Canada
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic