libaacs | branch: master | npzacs <[email protected]> | Wed May 2 08:54:37 2012 +0300| [1c921ea28c2f6eb8c9ef3dca6c178b962cbc4224] | committer: npzacs
Fixed printing hex strings in aacs_info > http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=1c921ea28c2f6eb8c9ef3dca6c178b962cbc4224 --- src/examples/aacs_info.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/examples/aacs_info.c b/src/examples/aacs_info.c index d1d7f29..fd87c0e 100644 --- a/src/examples/aacs_info.c +++ b/src/examples/aacs_info.c @@ -32,9 +32,9 @@ static const char *_hex2str(const uint8_t *s, unsigned n) str = realloc(str, n*2 + 1); for (ii = 0; ii < n; ii++) { str[2*ii] = hex[ s[ii] >> 4]; - str[2*ii + 1] = hex[ s[ii] & 0x07]; + str[2*ii + 1] = hex[ s[ii] & 0x0f]; } - str[ii] = 0; + str[2*ii] = 0; return str; } @@ -88,7 +88,7 @@ int main (int argc, char **argv) const uint8_t *vid = aacs_get_vid(aacs); const uint8_t *id = aacs_get_disc_id(aacs); printf("Disc ID: %s\n", id ? _hex2str(id, 20) : "???"); - printf("VID : %s\n", vid ? _hex2str(vid, 20) : "???"); + printf("VID : %s\n", vid ? _hex2str(vid, 16) : "???"); printf("MKBv : %d\n", aacs_get_mkb_version(aacs)); aacs_close(aacs); _______________________________________________ libaacs-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libaacs-devel
