~ubuntu-branches/ubuntu/quantal/elinks/quantal

« back to all changes in this revision

Viewing changes to src/util/conv.c

  • Committer: Bazaar Package Importer
  • Author(s): Siegfried-Angel Gevatter Pujals (RainCT)
  • Date: 2008-02-01 16:29:06 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080201162906-xdourui5tyjva0al
Tags: 0.11.3-5ubuntu1
 
* Merge from Debian unstable (LP: #187936); remaining changes:
  - Add X-Ubuntu-Gettext-Domain to .desktop files.
  - debian/control: Maintainer field update.
* Improve the text in the .desktop file and add some translations.
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
280
280
        for (; len; len--, src++) {
281
281
                if (isalphanum(*src) || *src == ' '
282
282
                    || *src == '.' || *src == ':' || *src == ';') {
283
 
                        add_bytes_to_string(string, src, 1);
 
283
                        if (!add_bytes_to_string(string, src, 1))
 
284
                                return NULL;
284
285
                } else {
285
 
                        add_bytes_to_string(string, "&#", 2);
286
 
                        add_long_to_string(string, (long) *src);
287
 
                        add_char_to_string(string, ';');
 
286
                        int rollback_length = string->length;
 
287
 
 
288
                        if (!add_bytes_to_string(string, "&#", 2)
 
289
                            || !add_long_to_string(string, (long) *src)
 
290
                            || !add_char_to_string(string, ';')) {
 
291
                                string->length = rollback_length;
 
292
                                string->source[rollback_length] = '\0';
 
293
                                return NULL;
 
294
                        }
288
295
                }
289
296
        }
290
297