Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created January 11, 2013 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/d45fe163cee35cad79e0 to your computer and use it in GitHub Desktop.
Save bnoordhuis/d45fe163cee35cad79e0 to your computer and use it in GitHub Desktop.
diff --git a/src/v8_typed_array_bswap.h b/src/v8_typed_array_bswap.h
index c8a24f5..87939bb 100644
--- a/src/v8_typed_array_bswap.h
+++ b/src/v8_typed_array_bswap.h
@@ -127,9 +127,9 @@ inline T SwapBytes(T x) {
}
template <>
-inline uint8_t SwapBytes(uint8_t x) { return x; }
+inline signed char SwapBytes(signed char x) { return x; }
template <>
-inline int8_t SwapBytes(int8_t x) { return x; }
+inline unsigned char SwapBytes(unsigned char x) { return x; }
template <>
inline uint16_t SwapBytes(uint16_t x) { return V8_TYPED_ARRAY_BSWAP16(x); }
template <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment