projects
/
stockfish
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5407131
)
Fix single digit day in engine_name()
author
Marco Costalba
<mcostalba@gmail.com>
Sat, 4 Oct 2008 11:21:28 +0000
(12:21 +0100)
committer
Marco Costalba
<mcostalba@gmail.com>
Sun, 5 Oct 2008 08:37:05 +0000
(10:37 +0200)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/misc.cpp
patch
|
blob
|
history
diff --git
a/src/misc.cpp
b/src/misc.cpp
index 237ca8d7d8d9525c7a7dc301f44a2695015352ac..07d58d637fb9fbc33b33509ed3212ca3b6246011 100644
(file)
--- a/
src/misc.cpp
+++ b/
src/misc.cpp
@@
-78,8
+78,10
@@
const std::string engine_name() {
size_t mon = 1 + months.find(date.substr(0, 3)) / 4;
std::stringstream s;
+ std::string day = (date[4] == ' ' ? date.substr(5, 1) : date.substr(4, 2));
+
s << "Glaurung clone " << date.substr(date.length() - 2) << std::setfill('0')
- << std::setw(2) << mon <<
date.substr(4, 2)
;
+ << std::setw(2) << mon <<
std::setw(2) << day
;
return s.str();
} else