Project

General

Profile

Actions

Bug #12202

closed

nkf.c static void mime_putc the variable being used for loop used for outer loop too

Added by fanantoxa (Anton Sivakov) almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:74473]

Description

for (i=0;i<mimeout_state.count;i++) {
  if (SP<mimeout_state.buf[i] && mimeout_state.buf[i]<DEL) {
    eof_mime();
    for (i=0;i<mimeout_state.count;i++) {
      (*o_mputc)(mimeout_state.buf[i]);
      base64_count++;
    }
    mimeout_state.count = 0;
  }
}

Variable 'i' here used for outer and inner loop.
Also variable mimeout_state.count can be changed within a loop it can affect outer loop


Related issues

Related to Ruby master - Bug #12201: nkf.c static void fold_conv part of exression always trueClosedshyouhei (Shyouhei Urabe)Actions
Actions

Also available in: Atom PDF