onetrueawk / awk

One true awk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regexp matches of the null string are incorrect

arnoldrobbins opened this issue · comments

Hi. Just so that I don't have to suffer alone, here's a hot-off-the-presses bug report that the OTA shares with gawk:

$ cat /tmp/x.awk
BEGIN {
	str = "\342\200\257"
	n = gsub(//, "X", str)
	print n, str
}
$ ./a.out -f /tmp/x.awk
4 X�X�X�X

This occurs in master. (Congrats, BTW, on merging the csv branch).

Thanks!

thanks(!) for this.

thank you @arnoldrobbins for the fix.