1
0

ebml_signed.cpp 247 B

123456789101112131415
  1. #include "ebml_signed.h"
  2. #include "ebml_unsigned.h"
  3. int64_t signed_read_ptr_len(uint64_t len, const uint8_t *ptr)
  4. {
  5. int64_t val = -1;
  6. uint8_t *dest = (uint8_t *)&val;
  7. for (int64_t i=0;i!=len;i++)
  8. {
  9. dest[len-i-1]=ptr[i];
  10. }
  11. return val;
  12. }