瀏覽代碼

SDL_UnionRect: If both rects are empty, zero out the result struct.

Ryan C. Gordon 4 年之前
父節點
當前提交
c573ebe143
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/video/SDL_rect.c

+ 1 - 0
src/video/SDL_rect.c

@@ -148,6 +148,7 @@ SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)
     if (SDL_RectEmpty(A)) {
       if (SDL_RectEmpty(B)) {
        /* A and B empty */
+       SDL_zerop(result);
        return;
       } else {
        /* A empty, B not empty */