summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index 56c0de0ec..78ad25532 100644
--- a/dive.c
+++ b/dive.c
@@ -2720,6 +2720,8 @@ void set_save_userid_local(short value)
void set_userid(char *rUserId)
{
prefs.userid = strdup(rUserId);
+ if (strlen(prefs.userid) > 30)
+ prefs.userid[30]='\0';
}
int average_depth(struct diveplan *dive)