Browse Source

AP_Params: fix seg fault in debug function

otherwise at start, when loading paramter is could fail at AP_Param.cpp:611, Debug("scan past end of eeprom")"
master
Pierre Kancir 8 years ago committed by Lucas De Marchi
parent
commit
5aa4bc4368
  1. 2
      libraries/AP_Param/AP_Param.cpp

2
libraries/AP_Param/AP_Param.cpp

@ -38,7 +38,7 @@ extern const AP_HAL::HAL &hal; @@ -38,7 +38,7 @@ extern const AP_HAL::HAL &hal;
#define ENABLE_DEBUG 1
#if ENABLE_DEBUG
# define Debug(fmt, args ...) do {hal.console->printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); } while(0)
# define Debug(fmt, args ...) do {::printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); } while(0)
#else
# define Debug(fmt, args ...)
#endif

Loading…
Cancel
Save