diff --git a/ChangeLog b/ChangeLog index 00c4feac1d..0ad962ff64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Feb 18 20:48:40 2002 Nobuyoshi Nakada + + * pack.c (pack_pack): avoid infinite loop at comment. + + * pack.c (pack_unpack): ditto. + Mon Feb 18 14:06:28 2002 Nobuyoshi Nakada * misc/ruby-mode.el (ruby-block-hanging-re): rescue block was too @@ -63,7 +69,6 @@ Thu Feb 16 02:11:08 2002 Nobuyoshi Nakada * misc/ruby-mode.el (ruby-font-lock-keywords): fontify instance/class/global variables start with '_'. ->>>>>>> 1.742 Fri Feb 15 14:40:38 2002 Yukihiro Matsumoto * eval.c (rb_eval): replace rb_cvar_declare() by rb_cvar_set(). diff --git a/pack.c b/pack.c index 00237659de..77ad3653b5 100644 --- a/pack.c +++ b/pack.c @@ -364,8 +364,7 @@ pack_pack(ary, fmt) if (ISSPACE(type)) continue; if (type == '#') { - while (p < pend) { - if (*p == '\n') continue; + while ((p < pend) && (*p != '\n')) { p++; } break; @@ -1084,8 +1083,7 @@ pack_unpack(str, fmt) if (ISSPACE(type)) continue; if (type == '#') { - while (p < pend) { - if (*p == '\n') continue; + while ((p < pend) && (*p != '\n')) { p++; } break;