Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in/out files are 32 chars maximum #8

Open
KanedaFr opened this issue Feb 19, 2024 · 3 comments
Open

in/out files are 32 chars maximum #8

KanedaFr opened this issue Feb 19, 2024 · 3 comments

Comments

@KanedaFr
Copy link
Contributor

While input and output vars allow 128 chars, since argv is 32 bytes per item, input/output file could only be 32 chars

https://github.com/42Bastian/sprpck/blob/618233c8d5a6647721abda99ad10b2354627de3c/src/sprpck.c#L731C25-L731C27

@42Bastian
Copy link
Owner

Actually, I see an issue in using strcpy to copy from argv to my_argv but not in the limit of 32 chars for a filename.

@KanedaFr
Copy link
Contributor Author

Well, since I'm defining assets by file, I'm locked by the 32 chars limit
ex: src/assets/logo/spritesmind_r.bmp -> "error src/assets/logo/spritesmind_r.bm not found"
of course, it produces long asset names but it's more useful than calling assets a, b, c, d because of the 32 char limits.

I patched my version with my_argv[CMD_OPT][128] and it works as expected, but I thought you'll perhaps want a better "fix" than that.

@42Bastian
Copy link
Owner

I do
make -C src/assets/logo sprites
but I see your point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants