bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55719: [PATCH] bindat strz fixes


From: Richard Hansen
Subject: bug#55719: [PATCH] bindat strz fixes
Date: Wed, 1 Jun 2022 16:29:14 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

On 6/1/22 16:23, Richard Hansen wrote:
Anyone that needs the current behavior should be using `str N`, not `strz N`. If they're using `strz N`, then I would consider that to be a bug in their code. If this change breaks someone, they can fix it easily: just change `strz N` to `str N`. I understand that we should endeavor to maintain compatibility, but keeping the current behavior would be intentionally preserving a bug to accommodate other bugs. I don't think that's a good trade-off.

Actually I'm wrong; there is a difference between `str N` and `strz N`. With 
`str N`, all zero bytes in the input string are included in the unpacked value 
(including trailing null bytes). With `strz N`, the unpacked string ends just 
before the first zero byte.

I'll remove the `strz N` change from the patch series so that we can get the 
rest merged.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]