From b98690ea5d3c7b42592f1f0803faffd0ac9b6f19 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Mon, 8 Jan 2024 14:21:14 -0500
Subject: [PATCH] Fixed some `u & v` expressions that should be `u && v`.
Thanks to @slouken for catching this!
---
src/sdl2_compat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index e58502e..b5908c4 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -6393,7 +6393,7 @@ SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh)
pglEnable((GLenum) target);
- if (u & v) {
+ if (u && v) {
pglActiveTextureARB(GL_TEXTURE2_ARB);
pglBindTexture((GLenum) target, (GLuint) v);
pglActiveTextureARB(GL_TEXTURE1_ARB);
@@ -6426,7 +6426,7 @@ SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh)
return -1;
}
- if (u & v) {
+ if (u && v) {
pglActiveTexture(GL_TEXTURE2);
pglBindTexture((GLenum) target, (GLuint) v);
pglActiveTexture(GL_TEXTURE1);
@@ -6483,7 +6483,7 @@ SDL_GL_UnbindTexture(SDL_Texture *texture)
return -1;
}
- if (u & v) {
+ if (u && v) {
pglActiveTextureARB(GL_TEXTURE2_ARB);
pglBindTexture((GLenum) target, 0);
pglDisable((GLenum) target);
@@ -6513,7 +6513,7 @@ SDL_GL_UnbindTexture(SDL_Texture *texture)
return -1;
}
- if (u & v) {
+ if (u && v) {
pglActiveTexture(GL_TEXTURE2);
pglBindTexture((GLenum) target, 0);
pglActiveTexture(GL_TEXTURE1);