When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
42 messages ยท Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
you just censored the outFile and main information ๐
nevertheless my bet are these two lines
buffer[strcspn(buffer, "\r\n")] = 0;
tokens = strtok(buffer, " , ");
its just a address to the c file
the addresses are on the left, the details are what the ones you censored
i mean the path mb
they have line numbers for the calls that cause the issue zzz๐
nop
good luck then
if anyone finds a solution an @ would be great
This
nevertheless my bet are these two lines
buffer[strcspn(buffer, "\r\n")] = 0;
tokens = strtok(buffer, " , ");
Is sus af, investigate it
how would i investigate it
Well read the man page of strcspn
if i were to remove that line would you expect that error to be gone?
And think of how you imagine it behaves when you're telling strcspn to search the buffer that you're currently declaring using strcspn's return value
Don't just throw spaghetti at the wall. Read the description of strcspn and think about the code (well, the first line of those mentioned)
Wait i'm le stupid
It's not a declaration, sorry
It's just an assignment.
well I removed that line and it still gives me the same error
so i feel its not something to do with strcspn
That approach is not informative. Removing a line arbitrarily might have effects that don't even relate to the error
Why do you call strtok() with NULL as its 1st argument on a line further down?
What do you imagine it does?
it gets the next token
e.g if i have 124124,foo,bar it will get 124124 then foo then bar each time i call it
Right, I didn't know. Manpage says that too
looks like to me you are returning a pointer to stack memory from some function
could it be from the getGrade function?
i thought it couldnt be because its not listed in the valgrind list
although that only returns an integer?
seems like it is I removed the getGrade function line and the error went away
it must be from the fact that
i am storing the ID in a array of strings (which is on the stack i assume?)