diff options
author | Eric Milkie <milkie@10gen.com> | 2015-04-07 16:42:23 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2015-04-08 16:27:14 -0400 |
commit | e87716a9286b6aa6f63a513012e55f6e42f634a2 (patch) | |
tree | 06e906a531f9699bc6e5bee143339eee4bf8841a /src/mongo/db/pipeline/value.h | |
parent | 655f6f61888035798519a5866dec9f9d76f7c224 (diff) | |
download | mongo-e87716a9286b6aa6f63a513012e55f6e42f634a2.tar.gz |
SERVER-15047 Remove undefined behavior from Timestamp
Diffstat (limited to 'src/mongo/db/pipeline/value.h')
-rw-r--r-- | src/mongo/db/pipeline/value.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/value.h b/src/mongo/db/pipeline/value.h index 4e30c30564d..88856c76df6 100644 --- a/src/mongo/db/pipeline/value.h +++ b/src/mongo/db/pipeline/value.h @@ -328,7 +328,9 @@ namespace mongo { inline Timestamp Value::getTimestamp() const { verify(getType() == bsonTimestamp); - return Date_t(_storage.timestampValue); + Timestamp ts; + ts.readFrom(&_storage.timestampValue); + return ts; } inline const char* Value::getRegex() const { |