Skip to content

Commit

Permalink
fix error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdelnero committed Nov 7, 2023
1 parent ce14c81 commit a3511df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mtp_operations/mtp_op_getobjecthandles.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ uint32_t mtp_op_GetObjectHandles(mtp_ctx * ctx,MTP_PACKET_HEADER * mtp_packet_hd
}
}while( ofs >= 0 && ofs < ctx->max_packet_size && handle_index < nb_of_handles);

if(sz < 0)
if(ofs < 0)
goto error;

PRINT_DEBUG_BUF(ctx->wrbuffer, ofs);
Expand Down

0 comments on commit a3511df

Please sign in to comment.