[C][The pwd builtin #EI0] issues on the tests

I get a weird character at the end on my test run, so I’m getting the following error

Is this on purpose and I should detect extraneous characters or is there something else?

Hey @jvivallos, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

Hey @andy1li, here’s my repo url GitHub - jvivallos/codecrafters-shell-c at master

@jvivallos It looks like the issue is here:

The last byte of external_command is uninitialized, so null-termination with \0 is not guaranteed.

Yes! that did the trick!. Thank you for time @andy1li

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.