Re: [PATCH v3 03/31] str: Fix a few bugs in trailing_strtoln()

2022-01-31 Thread Simon Glass
Hi Rasmus, On Mon, 31 Jan 2022 at 02:44, Rasmus Villemoes wrote: > > On 19/01/2022 02.42, Simon Glass wrote: > > At present this has a minor bug in that it reads the byte before the > > start of the string. > > Only for an empty string, AFAICS. Which is a bug, of course, but mostly > the caller

Re: [PATCH v3 03/31] str: Fix a few bugs in trailing_strtoln()

2022-01-31 Thread Rasmus Villemoes
On 19/01/2022 02.42, Simon Glass wrote: > At present this has a minor bug in that it reads the byte before the > start of the string. Only for an empty string, AFAICS. Which is a bug, of course, but mostly the caller is to blame. Also it doesn't handle a non-numeric prefix which is > only one

[PATCH v3 03/31] str: Fix a few bugs in trailing_strtoln()

2022-01-18 Thread Simon Glass
At present this has a minor bug in that it reads the byte before the start of the string. Also it doesn't handle a non-numeric prefix which is only one character long. Fix these bugs with a reworked implementation. Add a test for the second case. The first one is hard to test. Signed-off-by: