HI Alex

I've attached unified diff, hope it's the correct format.
Create with command:
svn diff -x -u gwlib/octstr.c
against trunk revision 5239

Werner



Werner Coetzee
Senior Message Engine Engineer

Tel:+27219107878
Email: [email protected]<mailto:[email protected]>


[cid:[email protected]]<https://www.clickatell.com>

Note: This 
disclaimer<https://www.clickatell.com/legal/general-terms-notices/privacy-notice/>
 applies to this email and its attachments

From: Alexander Malysh <[email protected]> On Behalf Of [email protected]
Sent: 19 July 2018 14:31
To: Werner Coetzee <[email protected]>
Cc: [email protected]
Subject: Re: Bug in octstr_shrink_blanks

Hi Werner,

patch is very welcome…

Thanks,
Alex



Am 19.07.2018 um 14:19 schrieb Werner Coetzee 
<[email protected]<mailto:[email protected]>>:


Hi all

I believe there's a bug in octstr_shrink_blanks() in gwlib/octstr.c

It does not shrink 2 whitespaces into 1, only when there's more than 2.
The issue is with the line "if (j - i > 1)", it should test for > 0

It's very easy to write a small test binary to see that it doesn't work.
After fixing it in my local repo it's working correctly (for 1, 2, 3+ 
consecutive spaces).

Regards
Werner Coetzee



Werner Coetzee
Senior Message Engine Engineer

Tel:+27219107878
Email: [email protected]<mailto:[email protected]>


<image56bcaa.JPG><https://www.clickatell.com/>


Note: This 
disclaimer<https://www.clickatell.com/legal/general-terms-notices/privacy-notice/>
 applies to this email and its attachments


Attachment: octstr.c.diff
Description: octstr.c.diff

Reply via email to