On Fri, Sep 1, 2023 at 5:24 AM Rob Landley <r...@landley.net> wrote: > > On 8/31/23 13:38, Michael Shavit wrote: > > On Thu, Aug 31, 2023 at 8:26 PM Michael Shavit <msha...@google.com> wrote: > >> > >> On Thu, Aug 31, 2023 at 6:57 PM Rob Landley <r...@landley.net> wrote: > >> > > >> > // DATA? Report out of range values as errors rather than truncating. > >> > - if (writing) data = atolx_range(toys.optargs[2], 0, > >> > (1ULL<<(8*bytes))-1); > >> > + if (writing && (data = atollu(toys.optargs[2]))>(~0LL)>>(64-8*bytes)) > >> > >> Shouldn't it be (~0ULL)? I think (~0LL) would make this an arithmetic > >> shift instead of a logical shift. > > > > The `devmem 0x000000008b300000 4 0x1FFFFFFFF` testcase doesn't detect > > and print an error because of this issue. But your change with (~0LL) > > changed to (~0ULL) does pass all the test cases previously mentioned. > > I'm trying to cut and paste your test cases into the git commit message and > don't know how to escape the "lines starting with # will be ignored" bit. :P > > Commit ad36c8765d8a > > Rob
Awesome, thanks for the quick merge :) . _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net