[hackers] [sbase][ed][patch] subtract 'a' from indices for marks

From: Evan Gates <evan.gates_AT_gmail.com>
Date: Fri, 15 Jul 2016 09:57:50 -0700


static int marks['z' - 'a'];

In this case c is the character read and index is out of bounds. We
need marks[c - 'a']

While playing around with optimization settings gcc caught caught this.

Also fix one check for c, change from isalpha to islower.


Received on Fri Jul 15 2016 - 18:57:50 CEST

This archive was generated by hypermail 2.3.0 : Fri Jul 15 2016 - 19:00:19 CEST