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

Reduce MAXPATHLEN usage #552

Merged
merged 3 commits into from Dec 22, 2014
Merged

Reduce MAXPATHLEN usage #552

merged 3 commits into from Dec 22, 2014

Conversation

@pinotree
Copy link
Contributor

pinotree commented Dec 22, 2014

Reduce the usage of MAXPATHLEN in engines,

  • making use of Common::String::format to format strings
  • reducing sizes of buffers to the actual amount needed

(Ideally, I'd love to not have MAXPATHLEN defined in common/scummsys.h when not provided by the system, but that's a longer work...)

pinotree added 3 commits Dec 22, 2014
Use Common::String::format instead of a MAXPATHLEN-sized char[] buffer.
Use Common::String::format instead of a MAXPATHLEN-sized char[] buffer.
Instead of allocate them with MAXPATHLEN as size, just give them the
size for the data that are going to be written on them.
@bluegr
Copy link
Member

bluegr commented Dec 22, 2014

Many thanks, the patches look good. Merging

bluegr added a commit that referenced this pull request Dec 22, 2014
@bluegr bluegr merged commit 7827dbd into scummvm:master Dec 22, 2014
@pinotree pinotree deleted the pinotree:reduce-maxpathlen branch Jan 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.