Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reduce length argument from uint64_t to unsigned int, for emscripten'…
…s sake.

No valid MKV file should ever need to store a value larger than 8 in this
variable ... and having it as a uint64_t prevents libnestegg from running
properly under emscripten.  (The reason for this problem is unclear, but
may be related to emscripten's use of double-precision floating point for
uint64_t arithmetic operations.)
  • Loading branch information
bemasc committed Nov 30, 2011
1 parent 357a34f commit 421df36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nestegg.c
Expand Up @@ -604,7 +604,7 @@ ne_read_svint(nestegg_io * io, int64_t * value, uint64_t * length)
}

static int
ne_read_uint(nestegg_io * io, uint64_t * val, uint64_t length)
ne_read_uint(nestegg_io * io, uint64_t * val, unsigned int length)
{
unsigned char b;
int r;
Expand All @@ -626,7 +626,7 @@ ne_read_uint(nestegg_io * io, uint64_t * val, uint64_t length)
}

static int
ne_read_int(nestegg_io * io, int64_t * val, uint64_t length)
ne_read_int(nestegg_io * io, int64_t * val, unsigned int length)
{
int r;
uint64_t uval, base;
Expand All @@ -653,7 +653,7 @@ ne_read_int(nestegg_io * io, int64_t * val, uint64_t length)
}

static int
ne_read_float(nestegg_io * io, double * val, uint64_t length)
ne_read_float(nestegg_io * io, double * val, unsigned int length)
{
union {
uint64_t u;
Expand Down

0 comments on commit 421df36

Please sign in to comment.