We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 789 - Defining NDEBUG screws up initial working directory
Summary: Defining NDEBUG screws up initial working directory
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: main (show other bugs)
Version: 1.2.13
Hardware: PowerPC Mac OS X (All)
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-07 11:00 UTC by jerha202
Modified: 2009-09-12 21:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jerha202 2009-09-07 11:00:41 UTC
When defining NDEBUG in a project that includes SDLMain.m as a source, the initial working directory will be / instead of the parent to the binary application. The reason is that at line 93 in SDLMain.m, the chdir() call has been placed in an assert, which is removed when NDEBUG is defined. chdir() should be called outside the assert.
Comment 1 Ryan C. Gordon 2009-09-12 21:28:35 UTC
This is fixed in svn revision #3579.

--ryan.