dankamongmen / growlight

notcurses block device manager / system installation tool
https://nick-black.com/dankwiki/index.php/Growlight
GNU General Public License v3.0
85 stars 12 forks source link

Passing scaling=0 to genprefix() generates illegal instruction #26

Closed dankamongmen closed 5 years ago

dankamongmen commented 5 years ago

Glad we moved on #19, since the first test yielded up this:

[schwarzgerat](2) $ ./growlight-test 

     CUnit - A unit testing framework for C - Version 2.1-3
     http://cunit.sourceforge.net/

Suite: test/growlight.c
  Test: genprefix() ...Illegal instruction
[schwarzgerat](132) $ 
dankamongmen commented 5 years ago

This is actually due to passing 0 for scaling. Is this ever valid? If not, we ought assert() on it.

dankamongmen commented 5 years ago

We now assert on a 0 for mult or decimal in genprefix().