X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/5dd6771b28c257af405d7248639ed0e3bcdce38b..0ca80aec5c708a8964dcd9d74fb13894d3df97fe:/sbr/smatch.c diff --git a/sbr/smatch.c b/sbr/smatch.c index 88a098b3..4d1d3d68 100644 --- a/sbr/smatch.c +++ b/sbr/smatch.c @@ -29,16 +29,16 @@ smatch(char *string, struct swit *swp) continue; /* no match */ for (sp = string; *sp == *tcp++;) { if (*sp++ == '\0') - return (tp - swp); /* exact match */ + return tp->swret; /* exact match */ } if (*sp) { if (*sp != ' ') continue; /* no match */ if (*--tcp == '\0') - return (tp - swp); /* exact match */ + return tp->swret; /* exact match */ } if (firstone == UNKWNSW) - firstone = tp - swp; + firstone = tp->swret; else firstone = AMBIGSW; }