plan9fox/sys
Ori Bernstein 10afa189d5 awk: correct incoherent cell in assignment (thanks smj, mpinjr)
In run.c::assign(), assigning to $0 from $F, a field,
where F >= 2, produces an incoherent cell.

The assignment occurs in two steps, first the string value
and then the float. When the string value is assigned to $0,
setsval invalidates the fields. If FS hasn't changed, after
getfval rebuilds the fields, NF = 1 and F >= 2, therefore $F
is definitely uninitialized. The result is a float val of
0.0, producing a boolean false in the pattern expression.

Coercing a string comparison gives the expected result
because the incoherent cell has the correct string
value, which is not empty and evaluates to true.
2022-06-25 20:03:41 +00:00
..
doc /sys/doc/troff.ms: give correct path for -m flag (thanks kyle) 2021-11-01 11:28:52 +00:00
games/lib /sys/games/lib/fortunes: GPU.js 2022-01-23 03:10:23 +00:00
include ndb: increase buffer size to allow longer lines 2022-06-19 23:42:04 +00:00
lib generate boot.scr in /sys/src/boot/reform 2022-06-18 18:23:22 +00:00
man kernel: add /srv/clone to get seperate /srv bulletin boards. 2022-06-21 13:21:38 +00:00
src awk: correct incoherent cell in assignment (thanks smj, mpinjr) 2022-06-25 20:03:41 +00:00