Hello,
Sorry for the late reply.

My solution is to change *line 294* of builtins/read.def.

Change
if (code == 0 || *intval < 0* || intval != (int)intval)

to

if (code == 0 || i*ntval <= 0* || intval != (int)intval)

Command:

./bash -c 'read -n0 <<< "abc";declare -p REPLY'

Output:
./bash: line 0: read: 0: invalid number
./bash: line 0: declare: REPLY: not found

i.e. behaviour #1.

Is this solution ok?

Regards,
Pranav

Reply via email to