Thetvdh / CardValidator

A C Card validator
GNU General Public License v3.0
1 stars 1 forks source link

Program crashes when more than one card in the linked list while running in terminal environment #8

Closed Thetvdh closed 2 years ago

Thetvdh commented 2 years ago

When running in CLion the program works perfectly however when running in a non CLion environment it exits out of the program when running in either CMD or Powershell. Issue only occurs when more than one card is in the linked list. Potentially an issue with the last node in the list?

OBlount commented 2 years ago

Works alright in my environment. Doesn't exit 'randomly'.

OBlount commented 2 years ago

Your best bet is to revert to a previous working commit and drop lines one by one till the crashing occurs.

Thetvdh commented 2 years ago

Works alright in my environment. Doesn't exit 'randomly'.

Is this in a Windows or Linux environment?

OBlount commented 2 years ago

Linux!

Thetvdh commented 2 years ago

Works on Ubuntu, Arch, and CLion runtime envrionments. Does not work in Powershell or CMD. Works with one item in the linked list, does not work with 2, works with more than 2.

Thetvdh commented 2 years ago

Fixed in commit 1c15141e4a2246dd208f9854ca3b9dc1a8434e1b

When adding the second item to the linked list the pNewCard->next was undefined and pointing to random data. Added a NULL pointer and all seems fine.