Changeset 897 for cpp/common
- Timestamp:
- 11/30/19 01:46:51 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/util-string.cpp
r892 r897 53 53 if (n < 0) //vsprintf was also buggy. If we were strict, we should abort the app now. 54 54 { 55 strcpy(buf, "[STR_ERR] "); // just to indicate the returned string is invalid56 strcat(buf, format); // return justthe original formatting string57 __android_log_print(ANDROID_LOG_ERROR, LOG_APP_NAME, "vsprintf() also failed, returning incorrect string'%s'", buf);55 strcpy(buf, "[STR_ERR] "); //a special prefix just to indicate the returned string is incorrect 56 strcat(buf, format); //append and return the original formatting string 57 __android_log_print(ANDROID_LOG_ERROR, LOG_APP_NAME, "vsprintf() also failed, using the incorrect resulting string: '%s'", buf); 58 58 } 59 n = 0; //pretend vsnprintf() or vsprintf() was OK to exit the endless loop59 n = strlen(buf); //pretend vsnprintf() or vsprintf() was OK to exit the endless loop 60 60 } 61 61 #endif
Note: See TracChangeset
for help on using the changeset viewer.