Changeset 11352

Show
Ignore:
Timestamp:
04/20/10 15:34:57 (5 years ago)
Author:
robert
Message:

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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/3ds/lib3ds/lib3ds_file.c

    r11344 r11352  
    453453static int  
    454454compare_node_id2( const void *a, const void *b ) { 
    455    return (int)(*((unsigned short*)a)) - (int)((*((Lib3dsNode**)b))->node_id); 
     455   // not a is a pointer in the calling bsearch routine the user_id is an unsigned, while the node_id is an unsigned short?! 
     456   return (int)(*((unsigned*)a)) - (int)((*((Lib3dsNode**)b))->node_id); 
    456457} 
    457458