summaryrefslogtreecommitdiff
path: root/dds.c
diff options
context:
space:
mode:
Diffstat (limited to 'dds.c')
-rw-r--r--dds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dds.c b/dds.c
index 8002d78..fe6a35d 100644
--- a/dds.c
+++ b/dds.c
@@ -36,7 +36,7 @@ void dds_setamplitude(float millivolts)
char scalebuff[64];
if (read(scalefd, scalebuff, sizeof(scalebuff))) {
- sscanf(scalebuff, "%f\n", &scale);
+ sscanf(scalebuff, "%10f\n", &scale); // the string should be ?.??? but round up the width a bit just in case
}
if (scale == 0) {