dragon: sensor: Last character of vpd calibration data was chomped

Given the vpd variable does not end with '\n', current code
was overwriting the last character with 0.
Overwrite \n only, add \0 otherwise.

BUG=chrome-os-partner:45679
TEST=Check with debug code that the whole vpd variable is taken in
account:
Before:
11-30 11:27:03.576   475   475 D CrosECSensor: Writing
in_accel_x_calibbias to -7 for device iio:device0 succeeded.
After:
11-30 11:28:44.670   477   477 D CrosECSensor: Writing
in_accel_x_calibbias to -79 for device iio:device0 succeeded.

Change-Id: If52ce9cdd0726761af957aac51bb0714dbfc8689
Signed-off-by: Gwendal Grignou <gwendal@google.com>
diff --git a/sensor_hub/cros_ec_sensors.cpp b/sensor_hub/cros_ec_sensors.cpp
index 8154e6a..04b4ee3 100644
--- a/sensor_hub/cros_ec_sensors.cpp
+++ b/sensor_hub/cros_ec_sensors.cpp
@@ -385,7 +385,10 @@
     close(fd);
     if (size == 0)
         return -EINVAL;
-    output[size - 1] = 0;
+    if (output[size - 1] == '\n')
+        output[size - 1] = 0;
+    else
+        output[size] = 0;
     return 0;
 }