About ps_roi_pool_kernel.cu implementation

I notify that im ps_roi_pool implementation, about fetching input data, at about line 57, there is code like this:

// Add roi offsets and clip to input boundaries

    hstart = min(max(hstart + roi_start_h, 0), height - 1);

    hend = min(max(hend + roi_start_h, 0), height - 1); //## why height -1, bu tnot height?

    wstart = min(max(wstart + roi_start_w, 0), width - 1);

    wend = min(max(wend + roi_start_w, 0), width - 1);

    bool is_empty = (hend <= hstart) || (wend <= wstart);

    const T* offset_input =

        input + (roi_batch_ind * channels + c_in) * height * width;

    T out_sum = 0;

    for (int h = hstart; h < hend; ++h) {

      for (int w = wstart; w < wend; ++w) {

similar code in roi_pool_kernel.cu at about line 51 DOES NOT do the subtraction, just use height instread of height -1, why? I ps_roi_pool\s current implementation, the data at the right and the bottom will be ignoreed in calculation?