Fix endian of message length

Change-Id: I7398142bcfb9482ea32f97513c5d93cce7376c28
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
diff --git a/sbe_interfaces.cpp b/sbe_interfaces.cpp
index 8575dad..195c1f7 100755
--- a/sbe_interfaces.cpp
+++ b/sbe_interfaces.cpp
@@ -52,7 +52,7 @@
     //little endian.
     std::array<sbe_word_t, READ_CMD_LENGTH> command =
     {
-        static_cast<sbe_word_t>(READ_CMD_LENGTH),
+        static_cast<sbe_word_t>(htobe32(READ_CMD_LENGTH)),
         htobe32(READ_OPCODE),
         htobe32(upper(address)),
         htobe32(lower(address))
@@ -86,7 +86,7 @@
     //little endian.
     std::array<sbe_word_t, WRITE_CMD_LENGTH> command =
     {
-        static_cast<sbe_word_t>(WRITE_CMD_LENGTH),
+        static_cast<sbe_word_t>(htobe32(WRITE_CMD_LENGTH)),
         htobe32(WRITE_OPCODE),
         htobe32(upper(address)),
         htobe32(lower(address)),