Calling all statisticians, I need you

I've inherited a program that, among other things, does some statistical analysis. I know absolutely nothing about stats

The program started throwing up a divide by zero error and it's because of this bit of code:-
VB Code:
  1. dblTemp = dblSPI - (dblIMean * dblTotalRawEntry)
  2. dblResult = QStandardDeviationFinal(xQuestionNumber) * dblSTI * lngCTOT
  3. dblResult = dblTemp / dblResult
I could post the code to calculate those other values if needed but I'm hoping this'll be enough.

The problem is that the standard deviation for the particular data this is happening on is zero, so the first dblResult calculates to zero and that causes the divide by zero error. So my question is:-

If the standard deviation is zero what's the correlation coefficient? I'd assume it's 1 but could it be -1? or zero?