Skip to content

Commit

Permalink
Merge branch 'master' of github.com:chocolate-doom/chocolate-doom
Browse files Browse the repository at this point in the history
  • Loading branch information
fragglet committed Aug 17, 2014
2 parents ecd1319 + 8522161 commit 97f1de6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/i_sdlsound.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int use_libsamplerate = 0;
// of the time: with all the Doom IWAD sound effects, at least. If a PWAD
// is used, clipping might occur.

float libsamplerate_scale = 0.65;
float libsamplerate_scale = 0.65f;

// Hook a sound into the linked list at the head.

Expand Down
27 changes: 16 additions & 11 deletions src/strife/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,19 +839,24 @@ void D_IdentifyVersion(void)
if((p = M_CheckParm("-iwad")) && p < myargc - 1)
{
char *iwad = myargv[p + 1];
size_t len = strlen(iwad) + 24;
char *filename = malloc(len);
char sepchar;

// how the heck is Choco surviving without this routine?
sepchar = M_GetFilePath(iwad, filename, len);
filename[strlen(filename)] = sepchar;
M_StringConcat(filename, "voices.wad", sizeof(filename));

if(!M_FileExists(filename))
size_t len = strlen(iwad) + 1;
char *iwadpath = Z_Malloc(len, PU_STATIC, NULL);
char *voiceswad;

// extract base path of IWAD parameter
M_GetFilePath(iwad, iwadpath, len);

// concatenate with /voices.wad
voiceswad = M_SafeFilePath(iwadpath, "voices.wad");
Z_Free(iwadpath);

if(!M_FileExists(voiceswad))
{
disable_voices = 1;
Z_Free(voiceswad);
}
else
name = filename; // STRIFE-FIXME: memory leak!!
name = voiceswad; // STRIFE-FIXME: memory leak!!
}
else
disable_voices = 1;
Expand Down
2 changes: 1 addition & 1 deletion textscreen/txt_fileselect.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ static void TXT_FileSelectMousePress(TXT_UNCAST_ARG(fileselect),
}
}

return TXT_WidgetMousePress(fileselect->inputbox, x, y, b);
TXT_WidgetMousePress(fileselect->inputbox, x, y, b);
}

static void TXT_FileSelectFocused(TXT_UNCAST_ARG(fileselect), int focused)
Expand Down

0 comments on commit 97f1de6

Please sign in to comment.