util: fix a typo in util_format_swizzle_4f
authorMarek Olšák <maraeo@gmail.com>
Tue, 2 Aug 2011 23:13:06 +0000 (01:13 +0200)
committerMarek Olšák <maraeo@gmail.com>
Tue, 2 Aug 2011 23:15:41 +0000 (01:15 +0200)
Reported by Gustaw Smolarczyk.

src/gallium/auxiliary/util/u_format.c

index 3a8aeab5fed3c850c64c79059612c8cfde4fac54..34922ab18ab545177df5acd2fd10f2385b26e649 100644 (file)
@@ -409,7 +409,7 @@ void util_format_swizzle_4f(float *dst, const float *src,
    unsigned i;
 
    for (i = 0; i < 4; i++) {
-      if (swz[i] < UTIL_FORMAT_SWIZZLE_W)
+      if (swz[i] <= UTIL_FORMAT_SWIZZLE_W)
          dst[i] = src[swz[i]];
       else if (swz[i] == UTIL_FORMAT_SWIZZLE_0)
          dst[i] = 0;