#Can someone tell me what is wrong with my code, my data in json file was cut off like this..
16 messages · Page 1 of 1 (latest)
Hi! I'd like to help, but I need more information to understand your issue. Here's what would help:
- Share your code - Please paste the C code you're working with (formatted in a code block with backticks)
- Show the error - Include any error messages or unexpected behavior you're seeing
- Clarify the problem - What exactly is "cut off"? Is it a parsing issue, file reading problem, or something else?
- Provide context - What's your JSON file structure? What are you trying to do?
Once you add these details, you'll likely get a quick answer! 👍
-# C @final fulcrum
How is the book struct defined
@timid topaz what is Book defined as
the only issue there would be with the struct, it seems to have it's strings set to be 4 long
it defined like this..
ah so it's taking the byte size of the pointer not array uhhh gimme like 10m to go find the right way to check size on that
wait
i just read more, found your issue, why do you use book.name in every strcspn :o
@timid topaz that seems like your issue
name is 4 long so it copies 4 from eh
each*
yeah, i just realize it too. that' s my fault to not check it again. Thank you for the help.