Skip to content

Commit

Permalink
Merge pull request #95 from BJNFNE/ndfetchdata-gcc-warning
Browse files Browse the repository at this point in the history
fix gcc warning in NdFetchData
  • Loading branch information
vlutas authored Jul 31, 2024
2 parents 2b1c90b + a631012 commit 8b4cc48
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions bddisasm/bdx86_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ NdGetVersion(

}


//
// NdFetchData
//
Expand All @@ -98,11 +97,19 @@ NdFetchData(
ND_UINT8 Size
)
{
return (4 == Size) ? ND_FETCH_32(Buffer) :
(1 == Size) ? ND_FETCH_8(Buffer) :
(8 == Size) ? ND_FETCH_64(Buffer) :
(2 == Size) ? ND_FETCH_16(Buffer) :
0;
switch (Size)
{
case 1:
return ND_FETCH_8(Buffer);
case 2:
return ND_FETCH_16(Buffer);
case 4:
return ND_FETCH_32(Buffer);
case 8:
return ND_FETCH_64(Buffer);
default:
return 0;
}
}


Expand Down

0 comments on commit 8b4cc48

Please sign in to comment.