Modulus doesn't work on doubles. :-|
This commit is contained in:
parent
217a1f1f7f
commit
bc791db732
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user