We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b58f130 commit e5241e6Copy full SHA for e5241e6
src/xml2_init.c
@@ -2,6 +2,7 @@
2
#include <libxml/xmlversion.h>
3
#include <libxml/xmlerror.h>
4
#include <libxml/parser.h>
5
+#include <string.h>
6
7
/* * *
8
* Author: Nick Wellnhofer <wellnhofer@aevum.de>
@@ -16,8 +17,11 @@ void handleStructuredError(void* userData, const xmlError* error) {
16
17
void handleStructuredError(void* userData, xmlError* error) {
18
#endif
19
- //std::string message = std::string(error->message);
20
- //message.resize(message.size() - 1); // trim off trailing newline
+ int len = strlen(error->message);
21
+ if(len > 2){
22
+ error->message[len-1] = '\0';
23
+ }
24
+
25
if (error->level <= 2) {
26
Rf_warning("%s [%i]", error->message, (int) error->code);
27
} else {
0 commit comments