summaryrefslogtreecommitdiff
path: root/hir_field_selection.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-24 15:27:50 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-24 15:27:50 -0700
commit4d184a1d02edef1720bb8093a91596831f7c017d (patch)
tree5cbbb596d4e4bc00832049371d8ec94154c0d945 /hir_field_selection.cpp
parent9e97ffb7547f25cbec96f1fb2c60f3ab9b0f0488 (diff)
Fix typo in swizzle processing loop
One of the accesses to str in the loop used str[0] instead of str[i]. Reported-by: Kenneth Graunke
Diffstat (limited to 'hir_field_selection.cpp')
-rw-r--r--hir_field_selection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/hir_field_selection.cpp b/hir_field_selection.cpp
index 9928b7b0bf..aa53120dbd 100644
--- a/hir_field_selection.cpp
+++ b/hir_field_selection.cpp
@@ -93,7 +93,7 @@ generate_swizzle(const char *str, ir_dereference *deref,
if ((str[i] < 'a') || (str[i] > 'z'))
return false;
- swiz_idx[i] = idx_map[str[0] - 'a'] - base;
+ swiz_idx[i] = idx_map[str[i] - 'a'] - base;
if ((swiz_idx[i] < 0) || (swiz_idx[i] >= (int) vector_length))
return false;
}