aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Fischer <moritz.fischer@ettus.com>2015-07-16 15:04:06 -0700
committerMoritz Fischer <moritz.fischer@ettus.com>2015-07-16 15:04:06 -0700
commitf3e827ae2fcd3803403b0dec3be30825b9bd909e (patch)
tree05df2809351dd25dfdbe6e955e299f95b083c652
parent3922f56adf33126abb288611f5a64b9fb1c11b25 (diff)
downloaduhd-f3e827ae2fcd3803403b0dec3be30825b9bd909e.tar.gz
uhd-f3e827ae2fcd3803403b0dec3be30825b9bd909e.tar.bz2
uhd-f3e827ae2fcd3803403b0dec3be30825b9bd909e.zip
e3xx: eeprom: Fix off by one error in serial number writing code.
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
-rw-r--r--host/lib/usrp/e300/e300_eeprom_manager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/usrp/e300/e300_eeprom_manager.cpp b/host/lib/usrp/e300/e300_eeprom_manager.cpp
index 45d1abea7..752bd3768 100644
--- a/host/lib/usrp/e300/e300_eeprom_manager.cpp
+++ b/host/lib/usrp/e300/e300_eeprom_manager.cpp
@@ -38,7 +38,7 @@ static void _string_to_bytes(const std::string &string, size_t max_len, boost::u
for (size_t i = 0; i < len; i++){
buffer[i] = string[i];
}
- if (len < max_len - 1)
+ if (len < max_len)
buffer[len] = '\0';
}