This commit is contained in:
jl777
2019-02-02 04:43:54 -11:00
parent a55cc1761e
commit d9f3929917
2 changed files with 5 additions and 5 deletions

View File

@@ -348,10 +348,10 @@ check_level(struct rogue_state *rs)
void void
chg_str(int amt) chg_str(int amt)
{ {
auto str_t comp; auto str_t comp = 0;
if (amt == 0) if (amt == 0)
return; return;
add_str(&pstats.s_str, amt); add_str(&pstats.s_str, amt);
comp = pstats.s_str; comp = pstats.s_str;
if (ISRING(LEFT, R_ADDSTR)) if (ISRING(LEFT, R_ADDSTR))
@@ -555,12 +555,12 @@ call_it(struct rogue_state *rs,struct obj_info *info)
} }
else if (!info->oi_guess) else if (!info->oi_guess)
{ {
msg(rs,terse ? "call it: " : "what do you want to call it? "); msg(rs,terse ? (char *)"call it: " : (char *)"what do you want to call it? ");
if (get_str(rs,prbuf, stdscr) == NORM) if (get_str(rs,prbuf, stdscr) == NORM)
{ {
if (info->oi_guess != NULL) if (info->oi_guess != NULL)
free(info->oi_guess); free(info->oi_guess);
info->oi_guess = malloc((unsigned int) strlen(prbuf) + 1); info->oi_guess = (char *)malloc((unsigned int) strlen(prbuf) + 1);
strcpy(info->oi_guess, prbuf); strcpy(info->oi_guess, prbuf);
} }
} }

View File

@@ -139,7 +139,7 @@ int32_t rogue_replay(uint64_t seed)
} }
if ( num > 0 ) if ( num > 0 )
{ {
rs = calloc(1,sizeof(*rs)); rs = (struct rogue_state *)calloc(1,sizeof(*rs));
rs->seed = seed; rs->seed = seed;
rs->keystrokes = keystrokes; rs->keystrokes = keystrokes;
rs->numkeys = num; rs->numkeys = num;