Hylafax Developers Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[hylafax-devel] Re: **BUG** DestControls broken
On 30 May, Dmitry Bely wrote:
>>
>> --- hylafax-aidan/faxd/DestControl.c++ Mon May 29 16:05:12 2000
>> +++ hylafax/faxd/DestControl.c++ Mon Aug 23 07:19:32 1999
>> @@ -222,20 +222,17 @@
>> crackArgv(fxStr& s)
>> {
>> int i = 0;
>> - u_int l = s.length();
>> + u_int l = s.length()+1; // +1 for \0
>> do {
>> - while (i < l && !isspace(s[i]))
>> - i++;
>> - if (i == l)
>> - break;
>> - s[i++] = '\0';
>> - int j = i;
>> - while ( (j < l) && isspace(s[j]))
>> - j++;
>> - if (j > i) {
>> + while (s[i] && !isspace(s[i])) i++;
>> + if (s[i] == '\0') break;
>> + s[i++] = '\0';
>> + int j = i;
>> + while (isspace(s[j])) j++;
>> + if (j > i) {
>> s.remove(i, j-i);
>
> l = s.length();
>
> *must* be added here, because length of the string changes (which we use
> later).
Robert, Darren - did you catch this?
a.
--
Aidan Van Dyk Create like a god,
aidan@highrise.ca command like a king,
http://www.highrise.ca/ work like a slave.
|\^/| |\^/| |\^/| |\^/| |\^/| |\^/|
_|\| |/|_ _|\| |/|_ _|\| |/|_ _|\| |/|_ _|\| |/|_ _|\| |/|_
> C < > a < > n < > a < > d < > a <
>_./|\._< >_./|\._< >_./|\._< >_./|\._< >_./|\._< >_./|\._<
____________________ HylaFAX(tm) Developers Mailing List ____________________
To unsub: mail -s unsubscribe hylafax-devel-request@hylafax.org < /dev/null