summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-27 15:26:58 +0000
committertruelight <truelight@openttd.org>2006-08-27 15:26:58 +0000
commit6e96dec3a8a2d638d27eb098e519be959f6d4ae3 (patch)
treeea18d0ecc70e00d64bb26c2ebdcd32508a666f60
parent708f9bc16025f02460974ba5f4a6c77f48a14f3c (diff)
downloadopenttd-6e96dec3a8a2d638d27eb098e519be959f6d4ae3.tar.xz
(svn r6176) -Fix r6052: I assumed an typedefd enum would be an uint8, which is a really stupid thing to assume.
This caused nasty endian bugs. Thank you SO MUCH Osai for all your time in debugging this!! And tnx Rubidium for spotting :)
-rw-r--r--order.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/order.h b/order.h
index 857aaa1dd..cc0bffc18 100644
--- a/order.h
+++ b/order.h
@@ -15,15 +15,17 @@ enum {
};
/* Order types */
-typedef enum OrderTypes {
+enum OrderTypes {
OT_NOTHING = 0,
OT_GOTO_STATION = 1,
OT_GOTO_DEPOT = 2,
OT_LOADING = 3,
OT_LEAVESTATION = 4,
OT_DUMMY = 5,
- OT_GOTO_WAYPOINT = 6
-} OrderType;
+ OT_GOTO_WAYPOINT = 6,
+};
+/* It needs to be 8bits, because we save and load it as such */
+typedef uint8 OrderType;
/* Order flags -- please use OFB instead OF and use HASBIT/SETBIT/CLEARBIT */