0

So close to submission! - However, when I check using valgrind the ouptut is:

==22743== Invalid read of size 8
==22743==    at 0x40135C: unload (dictionary.c:123)
==22743==    by 0x400E59: main (speller.c:152)

Looks like you're trying to access 8 bytes of memory that isn't yours? Did you try to index into an array beyond its bounds? Take a closer look at line 123 of dictionary.c.

I feel like it's to do with cursor2= cursor ->next

Would appreciate any thoughts :)

EDITED: removed code after input given

2
  • Trust your feeling. hash[a] does not have a "next", so on the first iteration of the for loop, the violation comes here cursor2= cursor2->next. Any number of ways to correct it; so back to the drawing board :) Commented Mar 24, 2020 at 17:19
  • thank you! Will remove the code too :)
    – RK99
    Commented Mar 24, 2020 at 17:26

0

You must log in to answer this question.

Browse other questions tagged .