* bug fix in AtomBIOS data table parser, incorrect int size causing issues

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42729 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV 2011-09-09 17:09:04 +00:00
parent a9d08e5e27
commit c3ec7fedec

View File

@ -1301,7 +1301,7 @@ atom_parse_data_header(atom_context *ctx, int index, uint16 *size,
{
int offset = index * 2 + 4;
int idx = CU16(ctx->data_table + offset);
uint8 *mdt = ctx->bios + ctx->data_table + 4;
uint16 *mdt = (uint16 *)ctx->bios + ctx->data_table + 4;
if (!mdt[index])
return B_ERROR;
@ -1323,7 +1323,7 @@ atom_parse_cmd_header(atom_context *ctx, int index, uint8 * frev,
{
int offset = index * 2 + 4;
int idx = CU16(ctx->cmd_table + offset);
uint8 *mct = ctx->bios + ctx->cmd_table + 4;
uint16 *mct = (uint16 *)ctx->bios + ctx->cmd_table + 4;
if (!mct[index])
return B_ERROR;