Skip to content

Commit

Permalink
Patched to compile...also, since appBinaryPath() returns a malloc()'d…
Browse files Browse the repository at this point in the history
… string

 now, we don't need to flag it as const, as the caller is then free to screw
 with the buffer with inpunity.
  • Loading branch information
icculus committed Dec 9, 2006
1 parent 95b1a16 commit fba827a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fileio.c
Expand Up @@ -444,7 +444,7 @@ MojoArchive *MojoArchive_initBaseArchive(void)
return GBaseArchive;
else
{
const char *basepath = MojoPlatform_appBinaryPath();
char *basepath = MojoPlatform_appBinaryPath();
MojoInput *io = MojoInput_newFromFile(basepath);

if (io != NULL)
Expand Down
2 changes: 1 addition & 1 deletion platform.h
Expand Up @@ -11,7 +11,7 @@ extern "C" {
int MojoSetup_main(int argc, char **argv);

// Caller must free returned string!
const char *MojoPlatform_appBinaryPath(void);
char *MojoPlatform_appBinaryPath(void);

uint32 MojoPlatform_ticks(void);

Expand Down
2 changes: 1 addition & 1 deletion platform/unix.c
Expand Up @@ -82,7 +82,7 @@ static char *findBinaryInPath(const char *bin)
} // findBinaryInPath


const char *MojoPlatform_appBinaryPath(void)
char *MojoPlatform_appBinaryPath(void)
{
const char *argv0 = GArgv[0];
char resolved[PATH_MAX];
Expand Down

0 comments on commit fba827a

Please sign in to comment.