TG9541/stm8ef

codeload.py: #ifdef and #ifndef broken

TG9541 opened this issue · 0 comments

I'm not sure when this bug was introduced ... since #ifdef and #ifndef once used to work.

The following sequence at line 223:

                   txCon = notInDictionary(tstWord) ^ (cndWord == 'ifdef')
                    vprint('CX #' + cndWord, tstWord + ' (', txCon, ') ' + line)
                    if not txCon:
                        continue

needs to be changed to:

                    txCon = bool(notInDictionary(tstWord)) ^ (cndWord == 'ifdef')
                    vprint('CX #' + cndWord + ' ' + tstWord + ' (' + str(txCon) +  ') ' + line)
                    if not txCon:
                        continue