nola_Coder 0 Light Poster

I am doing a Pong style game.
As long as the paddle isn't moving upward at the time, it will reflect the ball like it's supposed it. However, if the paddle is moving forward, it will run over the ball and the ball will go through it.

Here is my code for paddleMove().

void paddleMove() {
     
     paddle_tempX = paddle_x;
     paddle_tempY = paddle_y;
     
     if (key[KEY_LEFT] && paddle_x>171) {
        --paddle_x;                  
     }
     else if (key[KEY_RIGHT] && paddle_x<399) {
          ++paddle_x;
     } 
     else if (key[KEY_UP] && paddle_y>210) {
          --paddle_y;     
     }
     else if (key[KEY_DOWN] && paddle_y<=470) {
          ++paddle_y;     
     }

     acquire_screen();
     rectfill(screen, paddle_tempX, paddle_tempY, paddle_tempX+60, paddle_tempY+10, BLACK);
     rectfill(screen, paddle_x, paddle_y, paddle_x+60, paddle_y+10, BLUE);
     rectfill(screen, paddle_x+27, paddle_y, paddle_x+32, paddle_y+2, RED);
     //draw_sprite(screen, buffer, 0, 0);
     release_screen();
     
}