1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-24 13:33:01 +03:00

Fixed bug #153937, making sure the conversion functions return the number

* encoding.c doc/examples/testWriter.c: Fixed bug #153937, making
  sure the conversion functions return the number of byte written.
  Had to fix one of the examples.
Daniel
This commit is contained in:
Daniel Veillard
2004-10-31 15:35:32 +00:00
parent e44aafb19c
commit 05f9735ba3
4 changed files with 21 additions and 15 deletions

View File

@@ -1168,8 +1168,8 @@ ConvertInput(const char *in, const char *encoding)
if (out != 0) {
temp = size - 1;
ret = handler->input(out, &out_size, (const xmlChar *) in, &temp);
if (ret || temp - size + 1) {
if (ret) {
if ((ret < 0) || (temp - size + 1)) {
if (ret < 0) {
printf("ConvertInput: conversion wasn't successful.\n");
} else {
printf