Explorar el Código

libobs-opengl: Use correct size for PIXELFORMATDESCRIPTOR

Issue detected by PVS Studio.
Richard Stanway hace 4 años
padre
commit
7f2dfd53a9
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      libobs-opengl/gl-windows.c

+ 1 - 1
libobs-opengl/gl-windows.c

@@ -74,7 +74,7 @@ static inline int get_stencil_format_bits(enum gs_zstencil_format zsformat)
 static inline void init_dummy_pixel_format(PIXELFORMATDESCRIPTOR *pfd)
 {
 	memset(pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
-	pfd->nSize = sizeof(pfd);
+	pfd->nSize = sizeof(PIXELFORMATDESCRIPTOR);
 	pfd->nVersion = 1;
 	pfd->iPixelType = PFD_TYPE_RGBA;
 	pfd->cColorBits = 32;