ref: b5a08aea2bb8cffd37c2db3009ff54ca7dae0536
parent: fd0bf8b3a9e7b8fd046f88e93ada58fad7334b2e
author: Ali Gholami Rudi <ali@rudi.ir>
date: Wed Aug 17 12:40:11 EDT 2022
map: map empty strings to index 0
--- a/map.c
+++ b/map.c
@@ -12,6 +12,8 @@
int map(char *s)
{
int i;
+ if (!s[0])
+ return 0;
if (s[0] == '.' && s[1] && !s[2]) /* ".x" is mapped to 'x' */
return (unsigned char) s[1];
if (!mapdict)