Way back in Reply #18 of your other Thread I questioned you use of strncpy() and you have not changed it.
(This is why I don't like people dealing with the same project in multiple Threads)
I am not an expert but I think you are doing it wrong. I believe you should only be copying 4 characters. You need to check whether your copying is screwing up pirData[]
In any case, as you only want to change the 4th character why not just do it with pirData[3] = '1';
...R