fix: only update modified field, if name of the author differs

This commit is contained in:
jeefo 2022-10-06 14:50:58 +03:00
commit 18ee4ce38b
No known key found for this signature in database
GPG key ID: D85B0637366787C3

View file

@ -1898,7 +1898,10 @@ bool BotGraph::saveGraphData () {
strings.copy (exten.author, m_extenHeader.author, cr::bufsize (exten.author));
}
strings.copy (exten.modified, author.chars (), cr::bufsize (exten.author)); // always update modified by
// only update modified by, if name differs
if (m_graphAuthor != author && strncmp (m_extenHeader.author, m_extenHeader.modified, cr::bufsize (m_extenHeader.author)) != 0) {
strings.copy (exten.modified, author.chars (), cr::bufsize (exten.author));
}
exten.mapSize = getBspSize ();
// ensure narrow places saved into file