From 3bef6f9eae7de8eb2059ab9d6a208424fd9e8a19 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 20 Apr 2010 13:34:57 +0000 Subject: [PATCH] Implemented Colin MacDonald's recommended change of "unsigned short" to "unsigned" to solve big endian problem under Solaris. Also added comment to highlight the oddity of the mixing of types in the associated lib3ds code. --- src/osgPlugins/3ds/lib3ds/lib3ds_file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/3ds/lib3ds/lib3ds_file.c b/src/osgPlugins/3ds/lib3ds/lib3ds_file.c index 355506c9b..5b695686e 100644 --- a/src/osgPlugins/3ds/lib3ds/lib3ds_file.c +++ b/src/osgPlugins/3ds/lib3ds/lib3ds_file.c @@ -452,7 +452,8 @@ compare_node_id( const void *a, const void *b ) { static int compare_node_id2( const void *a, const void *b ) { - return (int)(*((unsigned short*)a)) - (int)((*((Lib3dsNode**)b))->node_id); + // not a is a pointer in the calling bsearch routine the user_id is an unsigned, while the node_id is an unsigned short?! + return (int)(*((unsigned*)a)) - (int)((*((Lib3dsNode**)b))->node_id); }