GoldEd can fall because of invalid time in message

This commit is contained in:
Ianos Gnatiuc 2005-10-16 22:37:22 +00:00
parent 3e941b03a7
commit aae02f62bd
2 changed files with 9 additions and 3 deletions

View File

@ -10,6 +10,9 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
- GoldEd can fall because of invalid time in message.
(bugreport from Alexander Kolyada)
+ New config file token: QuoteUseNewAI No/Yes. It will try to solve + New config file token: QuoteUseNewAI No/Yes. It will try to solve
false quoting when '<' and '>' characters is used. false quoting when '<' and '>' characters is used.

View File

@ -172,9 +172,12 @@ char* TimeToStr(char* buf, time_t t);
long YMD2JDN(unsigned yr, unsigned mo, unsigned day) __attribute__ ((const)); long YMD2JDN(unsigned yr, unsigned mo, unsigned day) __attribute__ ((const));
void JDN2YMD(long scalar, unsigned *yr, unsigned *mo, unsigned *day); void JDN2YMD(long scalar, unsigned *yr, unsigned *mo, unsigned *day);
inline struct tm *gmtime(const time32_t *timep) { inline struct tm *gmtime(const time32_t *timep)
const time_t temp(*timep); {
return gmtime(&temp); const time_t zero(0);
const time_t temp(*timep);
struct tm *time = gmtime(&temp);
return time ? time : gmtime(&zero);
} }
// ------------------------------------------------------------------ // ------------------------------------------------------------------