fixed 3 problem that they maybe don't make bug.

This commit is contained in:
hyzboy 2024-03-20 23:06:45 +08:00
parent c8fe331ef9
commit 2be810bbe9
3 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,7 @@ namespace hgl
{ {
fp=-1; fp=-1;
mode=FileOpenMode::None; mode=FileOpenMode::None;
hgl_zero(file_state);
} }
FileAccess::~FileAccess() FileAccess::~FileAccess()

View File

@ -87,6 +87,9 @@ namespace hgl
*/ */
int LoadStringFromText(UTF16String &full_text,const void *source_data,const int size,const CharSet &cs) int LoadStringFromText(UTF16String &full_text,const void *source_data,const int size,const CharSet &cs)
{ {
if(!source_data||size<=0)
return(0);
const uint8 *data=(const uint8 *)source_data; const uint8 *data=(const uint8 *)source_data;
u16char *str=nullptr; u16char *str=nullptr;

View File

@ -38,6 +38,7 @@ namespace hgl
Time::Time() Time::Time()
{ {
gmt_off=0;
hours=0; hours=0;
minutes=0; minutes=0;
seconds=0; seconds=0;
@ -51,6 +52,7 @@ namespace hgl
Time::Time(int h,int m,int s,int ms) Time::Time(int h,int m,int s,int ms)
{ {
gmt_off=0;
hours=h; hours=h;
minutes=m; minutes=m;
seconds=s; seconds=s;