mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-28 03:44:15 +01:00
Get SimpleStringDictionary compiling on Linux.
BUG=http://code.google.com/p/chromium/issues/detail?id=77656 Review URL: https://breakpad.appspot.com/564002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1155 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
30bb1ab601
commit
093b8aee9b
@ -30,8 +30,7 @@
|
||||
#ifndef COMMON_SIMPLE_STRING_DICTIONARY_H_
|
||||
#define COMMON_SIMPLE_STRING_DICTIONARY_H_
|
||||
|
||||
#import <string>
|
||||
#import <vector>
|
||||
#include <string.h>
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
@ -80,15 +79,18 @@ class KeyValueEntry {
|
||||
value = "";
|
||||
}
|
||||
|
||||
strlcpy(key_, key, sizeof(key_));
|
||||
strlcpy(value_, value, sizeof(value_));
|
||||
strncpy(key_, key, sizeof(key_));
|
||||
strncpy(value_, value, sizeof(value_));
|
||||
key_[sizeof(key_) - 1] = '\0';
|
||||
value_[sizeof(value_) - 1] = '\0';
|
||||
}
|
||||
|
||||
void SetValue(const char *value) {
|
||||
if (!value) {
|
||||
value = "";
|
||||
}
|
||||
strlcpy(value_, value, sizeof(value_));
|
||||
strncpy(value_, value, sizeof(value_));
|
||||
value_[sizeof(value_) - 1] = '\0';
|
||||
};
|
||||
|
||||
// Removes the key/value
|
||||
|
Loading…
Reference in New Issue
Block a user