]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/COpenGLDriver.cpp
Avoid undefined arithmetic on nullptr in buffer_offset function
[irrlicht.git] / source / Irrlicht / COpenGLDriver.cpp
index b0f122b06fed53fc1c584d0f4d9f23483e146ae5..c213283bbf1651c72ff42f3363eb236ce88949d9 100644 (file)
@@ -746,10 +746,10 @@ IRenderTarget* COpenGLDriver::addRenderTarget()
 }\r
 \r
 \r
-// small helper function to create vertex buffer object adress offsets\r
-static inline u8* buffer_offset(const long offset)\r
+// small helper function to create vertex buffer object address offsets\r
+static inline const GLvoid * buffer_offset(const long offset)\r
 {\r
-       return ((u8*)0 + offset);\r
+       return (const GLvoid *)offset;\r
 }\r
 \r
 \r