aboutsummaryrefslogtreecommitdiffstats
path: root/src/character.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/character.c')
-rw-r--r--src/character.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/character.c b/src/character.c
index 5808d48a235..5a06c7f4d6c 100644
--- a/src/character.c
+++ b/src/character.c
@@ -1,6 +1,6 @@
1/* Basic character support. 1/* Basic character support.
2 2
3Copyright (C) 2001-2012 Free Software Foundation, Inc. 3Copyright (C) 2001-2013 Free Software Foundation, Inc.
4Copyright (C) 1995, 1997, 1998, 2001 Electrotechnical Laboratory, JAPAN. 4Copyright (C) 1995, 1997, 1998, 2001 Electrotechnical Laboratory, JAPAN.
5 Licensed to the Free Software Foundation. 5 Licensed to the Free Software Foundation.
6Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 6Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
@@ -833,8 +833,8 @@ string_escape_byte8 (Lisp_Object string)
833 833
834 if (multibyte) 834 if (multibyte)
835 { 835 {
836 if ((MOST_POSITIVE_FIXNUM - nchars) / 3 < byte8_count 836 if (byte8_count > (MOST_POSITIVE_FIXNUM - nchars) / 3
837 || (STRING_BYTES_BOUND - nbytes) / 2 < byte8_count) 837 || byte8_count > (STRING_BYTES_BOUND - nbytes) / 2)
838 string_overflow (); 838 string_overflow ();
839 839
840 /* Convert 2-byte sequence of byte8 chars to 4-byte octal. */ 840 /* Convert 2-byte sequence of byte8 chars to 4-byte octal. */
@@ -843,7 +843,7 @@ string_escape_byte8 (Lisp_Object string)
843 } 843 }
844 else 844 else
845 { 845 {
846 if ((STRING_BYTES_BOUND - nbytes) / 3 < byte8_count) 846 if (byte8_count > (STRING_BYTES_BOUND - nbytes) / 3)
847 string_overflow (); 847 string_overflow ();
848 848
849 /* Convert 1-byte sequence of byte8 chars to 4-byte octal. */ 849 /* Convert 1-byte sequence of byte8 chars to 4-byte octal. */