Merge pull request #232 from josephevans/master

Cast content_length to signed int for error-check comparison
This commit is contained in:
Kfir Itzhak 2013-11-04 11:59:44 -08:00
commit 891757da74
1 changed files with 2 additions and 2 deletions

View File

@ -1086,7 +1086,7 @@ int RemoteCameraHttp::PreCapture()
int RemoteCameraHttp::Capture( Image &image )
{
unsigned int content_length = GetResponse();
int content_length = GetResponse();
if ( content_length == 0 )
{
Warning( "Unable to capture image, retrying" );
@ -1112,7 +1112,7 @@ int RemoteCameraHttp::Capture( Image &image )
}
case X_RGB :
{
if ( content_length != image.Size() )
if ( (unsigned int)content_length != image.Size() )
{
Error( "Image length mismatch, expected %d bytes, content length was %d", image.Size(), content_length );
Disconnect();