Changeset 14573
- Timestamp:
- Oct 11, 2015, 4:15:19 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/utils.c
r14503 r14573 1122 1122 FORMAT_MESSAGE_IGNORE_INSERTS, 1123 1123 NULL, code, 0, (LPWSTR)&wide_text, 0, NULL); 1124 if (wide_size == 0) 1125 return tr_strdup_printf ("Unknown error (0x%08x)", code); 1124 1126 1125 1127 if (wide_size != 0 && wide_text != NULL) … … 1128 1130 LocalFree (wide_text); 1129 1131 1130 /* Most (all?) messages contain "\r\n" in the end, chop it */ 1131 text_size = strlen (text); 1132 while (text_size > 0 && 1133 text[text_size - 1] >= '\0' && 1134 text[text_size - 1] <= ' ') 1135 text[--text_size] = '\0'; 1132 if (text != NULL) 1133 { 1134 /* Most (all?) messages contain "\r\n" in the end, chop it */ 1135 text_size = strlen (text); 1136 while (text_size > 0 && isspace ((uint8_t) text[text_size - 1])) 1137 text[--text_size] = '\0'; 1138 } 1136 1139 1137 1140 return text;
Note: See TracChangeset
for help on using the changeset viewer.