diff --git a/doc/PdfFontTTFSubset.cpp b/doc/PdfFontTTFSubset.cpp
index 043a311..4f6d586 100644
--- a/doc/PdfFontTTFSubset.cpp
+++ b/doc/PdfFontTTFSubset.cpp
@@ -70,7 +70,8 @@ inline unsigned short Big2Little(unsigned short big)
 
 inline short Big2Little(short big)
 {
-    return ((big << 8) & 0xFF00) | ((big >> 8) & 0x00FF);
+    unsigned short little = Big2Little(*reinterpret_cast<unsigned short*>(&big));
+    return *reinterpret_cast<short*>(&little);
 }
 #else
 #define Big2Little( x ) x
