diff options
| author | Warner Losh <imp@FreeBSD.org> | 2025-08-18 18:01:51 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2025-08-18 18:01:51 +0000 |
| commit | f7603feee9e1ff25e6a246e1fc9b1b74030ba203 (patch) | |
| tree | 8610ae33f4fec1e447a8dfd1b3a89ff0f6fb088d | |
| parent | 2f2a0304d0de65466eee733e9d6ed88dbcfdf925 (diff) | |
awk: Add missing file from 20250804 updatevendor/one-true-awk/4d5b3604b34b_1vendor/one-true-awk
run.c wasn't included in the 20250804 update. Include it now.
Sponsored by: Netflix
| -rw-r--r-- | run.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1567,6 +1567,8 @@ Cell *assign(Node **a, int n) /* a[0] = a[1], a[0] += a[1], etc. */ xf *= yf; break; case DIVEQ: + if ((x->tval & CON) != 0) + FATAL("non-constant required for left side of /="); if (yf == 0) FATAL("division by zero in /="); xf /= yf; @@ -2188,7 +2190,7 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis /* random() returns numbers in [0..2^31-1] * in order to get a number in [0, 1), divide it by 2^31 */ - u = (Awkfloat) random() / (0x7fffffffL + 0x1UL); + u = (Awkfloat) random() / RAND_MAX; break; case FSRAND: if (isrec(x)) /* no argument provided */ |
