The issue is that your pattern is not what you want.
The dot represents any character, so your pattern of "." says to simply find a character, which 1 satisfies. Since the dot is a special character, you must escape it with the % character.
Your pattern should be "%.", which will return the starting and ending positions of the decimal point.
Actually, you should be using the string.match function, which return either the dot or nil (rather than the starting and ending points in the character string).