Fix Decompiler error "invalid subscript xyz"

For shaders using array Structs, the code would damage the reference to the struct member by trimming all past the array brackets.

This fixes the problem by using string.replace to replace the default [0] with the proper register index like [r1.w], rather than the clunky char* array manipulations.  This modifies only the part we care about, instead of breaking and rebuilding the string.