Skip to content

Commit 7f3097e

Browse files
authored
Merge pull request #66 from sadeem-albir/patch-7
Update getfloat.c
2 parents d7272a2 + 88b2b26 commit 7f3097e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapter_5/exercise_5_02/getfloat.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int getfloat(float *pn)
4646
while (isspace(c = getch()))
4747
;
4848

49-
if (!isdigit(c) && c != EOF && c != '+' && c != '-')
49+
if (!isdigit(c) && c != EOF && c != '+' && c != '-' && c != '.')
5050
{
5151
ungetch(c);
5252
return 0;

0 commit comments

Comments
 (0)