diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-03-26 08:01:02 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-03-26 08:02:02 +0300 |
commit | 5759e335c3462b9d705b68be18d621364af18688 (patch) | |
tree | 44bab6286d7ce6630405e1cc41e978efc6cbbef5 /source/blender/blenkernel | |
parent | 0512e20ae9939f4a688f4f485acdf246dc4d7682 (diff) |
Driver Variable Name Validation: Added missing check for zero-length (i.e. "blank") names
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 52bece60361..845229e49e3 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -1612,6 +1612,11 @@ void driver_variable_name_validate(DriverVar *dvar) /* clear all invalid-name flags */ dvar->flag &= ~DVAR_ALL_INVALID_FLAGS; + /* 0) Zero-length identifiers are not allowed */ + if (dvar->name[0] == '\0') { + dvar->flag |= DVAR_FLAG_INVALID_EMPTY; + } + /* 1) Must start with a letter */ /* XXX: We assume that valid unicode letters in other languages are ok too, hence the blacklisting */ if (ELEM(dvar->name[0], '0', '1', '2', '3', '4', '5', '6', '7', '8', '9')) { |