diff --git a/ArduCopter/Log.pde b/ArduCopter/Log.pde index 5a2d34edd1..462ad73529 100644 --- a/ArduCopter/Log.pde +++ b/ArduCopter/Log.pde @@ -347,7 +347,7 @@ static int find_last_log_page(int bottom_page) //Serial.printf("look page:%d, check:%d\n", look_page, check); - if(check == (int32_t)~0) + if(check == -1L) top_page = look_page; else bottom_page = look_page; diff --git a/ArduPlane/Log.pde b/ArduPlane/Log.pde index 90bb19b3ea..59c9971c65 100644 --- a/ArduPlane/Log.pde +++ b/ArduPlane/Log.pde @@ -319,7 +319,7 @@ static int find_last_log_page(int bottom_page) look_page = (top_page + bottom_page) / 2; DataFlash.StartRead(look_page); check = DataFlash.ReadLong(); - if(check == (int32_t)~0) + if(check == -1L) top_page = look_page; else bottom_page = look_page;