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

Fix compilation when build path is long #22

Merged
merged 1 commit into from Mar 18, 2016

Conversation

aron1024
Copy link
Contributor

Also remove generated file Parser.cpp

Also remove generated file Parser.cpp
@Ragora
Copy link
Contributor

Ragora commented Mar 17, 2016

I always did find it rather peculiar that one of the suggested actions for resolving compile errors was to reduce the length of the file path.

@SLAwww SLAwww merged commit 344c836 into Croteam-official:master Mar 18, 2016
@SLAwww
Copy link
Contributor

SLAwww commented Mar 18, 2016

Finally someone found the cause of that, thank you! Debugging didn't really help find the reason of the problem with paths, I'm not sure why I didn't look into Scanner.l myself. But I had to replace snprintf with sprintf because snprintf was not recognized by VS 2013 compiler.

@aron1024
Copy link
Contributor Author

I found the issue because VS 2015 reported a stack overrun in Ecc for certain *.es files in my build - that's why I also switched it to use the safer snprintf. I think all versions of VS have _snprintf instead but apparently that works slightly different than the standard snprintf. Anyway, in this case a buffer size of 512 with sprintf is more than enough for Windows (which enforces a max path length of 260 on every file) and should also suffice for other platforms.

@gogirl2016
Copy link

gogirl2016 commented Mar 18, 2016 via email

ericwomer pushed a commit to ericwomer/Serious-Engine that referenced this pull request Apr 15, 2016
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

Successfully merging this pull request may close these issues.

None yet

4 participants