Modulus doesn't work on doubles. :-|

This commit is contained in:
Stuart Longland 2008-01-11 14:37:41 +10:00
parent 217a1f1f7f
commit bc791db732

View File

@ -264,8 +264,7 @@ void photo_handler( struct gallery_info* gallery,
*/
char* rotation_str = hdf_get_value( cgi->hdf, "Query.rotation", "0" );
double rotation = atof( rotation_str );
if ( ( rotation < -360.0 ) || ( rotation > 360.0 ) )
rotation = rotation % 360.0
if ( ( rotation < -360.0 ) || ( rotation > 360.0 ) ) rotation = 0.0;
dprintf("photo_handler: asked for %dx%d image "
"at %fdeg rotation and %d quality\n",