Skip to content

Commit

Permalink
tpm2_dump_capability: Display specification minor version correctly
Browse files Browse the repository at this point in the history
value needs to be converted to float before doing the division, otherwise the minor version will be truncated to zero.
  • Loading branch information
webmeister authored and William Roberts committed Aug 21, 2017
1 parent 89b1466 commit 58f675b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/tpm2_dump_capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ dump_tpm_properties_fixed (TPMS_TAGGED_PROPERTY properties[],
printf ("TPM_PT_LEVEL: %d\n", value);
break;
case TPM_PT_REVISION:
printf ("TPM_PT_REVISION: %.2f\n", (float)(value / 100));
printf ("TPM_PT_REVISION: %.2f\n", (float)value / 100);
break;
case TPM_PT_DAY_OF_YEAR:
printf ("TPM_PT_DAY_OF_YEAR: 0x%08x\n", value);
Expand Down

0 comments on commit 58f675b

Please sign in to comment.