git-config-set: Properly terminate strings with '\0'
When a lowercase version of the key was generated, it was not terminated. Strangely enough, it worked on Linux and macosx anyway. Just cygwin barfed. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
e814bc4d15
commit
3dd94e3b2e
@ -38,6 +38,7 @@ static int get_value(const char* key_, const char* regex_)
|
||||
key = malloc(strlen(key_)+1);
|
||||
for (i = 0; key_[i]; i++)
|
||||
key[i] = tolower(key_[i]);
|
||||
key[i] = 0;
|
||||
|
||||
if (regex_) {
|
||||
if (regex_[0] == '!') {
|
||||
|
Loading…
Reference in New Issue
Block a user