Skip to content

Commit

Permalink
Fix: error C4703: potentially uninitialized local pointer variable 'w…
Browse files Browse the repository at this point in the history
…hat' used (windows compile).
  • Loading branch information
k21971 committed Sep 28, 2024
1 parent 40524f9 commit 049bda6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/evilhack-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3638,4 +3638,6 @@ The following changes to date are:
- Finish up Druid quest text, fix formatting
- All demons/devils are now unaligned (evil)
- New terrain type - grass
- Fix: error C4703: potentially uninitialized local pointer variable
'what' used (windows compile)

4 changes: 2 additions & 2 deletions src/mhitu.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ register struct monst *mtmp;
mtmp->mundetected = 0;
if (!(Blind ? Blind_telepat : Unblind_telepat)) {
struct obj *obj = level.objects[mtmp->mx][mtmp->my];
const char *what;
const char *what = something;
int concealment = concealed_spot(mtmp->mx, mtmp->my);

if (concealment == 2) { /* object cover */
Expand Down Expand Up @@ -1426,7 +1426,7 @@ register struct attack *mattk;
mtmp->mundetected = 0;
if (!(Blind ? Blind_telepat : Unblind_telepat)) {
struct obj *obj = level.objects[mtmp->mx][mtmp->my];
const char *what;
const char *what = something;
int concealment = concealed_spot(mtmp->mx, mtmp->my);

if (concealment == 2) { /* object cover */
Expand Down

0 comments on commit 049bda6

Please sign in to comment.