mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 03:23:09 +03:00
Merge branch 'pkova/lore' (#2195)
* pkova/lore: zuse: allow non-trailing null bytes in to-wain:format u3: fix lore jet to allow non-trailing null bytes Signed-off-by: Jared Tobin <jared@tlon.io>
This commit is contained in:
commit
8905a706a8
@ -5476,12 +5476,13 @@
|
||||
~% %lore ..is ~
|
||||
|= lub/@
|
||||
=| tez/(list @t)
|
||||
=+ len=(met 3 lub)
|
||||
|- ^+ tez
|
||||
=+ ^= wor
|
||||
=+ [meg=0 i=0]
|
||||
|- ^- {meg/@ i/@ end/@f}
|
||||
=+ gam=(cut 3 [i 1] lub)
|
||||
?: =(0 gam)
|
||||
?: =(len i)
|
||||
[meg i %.y]
|
||||
?: =(10 gam)
|
||||
[meg i %.n]
|
||||
|
@ -13,27 +13,23 @@
|
||||
|
||||
while ( 1 ) {
|
||||
c3_w meg_w = 0;
|
||||
c3_y end_y;
|
||||
c3_o end_y;
|
||||
|
||||
c3_y byt_y;
|
||||
while ( 1 ) {
|
||||
if ( pos_w >= len_w ) {
|
||||
if ( (pos_w + meg_w) >= len_w ) {
|
||||
byt_y = 0;
|
||||
end_y = c3y;
|
||||
break;
|
||||
}
|
||||
byt_y = u3r_byte(pos_w + meg_w, lub);
|
||||
|
||||
if ( (10 == byt_y) || (0 == byt_y) ) {
|
||||
end_y = __(byt_y == 0);
|
||||
if ( 10 == byt_y ) {
|
||||
end_y = c3n;
|
||||
break;
|
||||
} else meg_w++;
|
||||
}
|
||||
|
||||
if ((byt_y == 0) && ((pos_w + meg_w + 1) < len_w)) {
|
||||
return u3m_bail(c3__exit);
|
||||
}
|
||||
|
||||
{
|
||||
c3_y* byts_y = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user