Compare ((char *)p)[0] against '\0', not (char *)p.
Also make the library example compile again under MSVC, and make the perl scripts to build the image tables work.pull/3/head
parent
1bc73c4a75
commit
f4916f9ee4
|
@ -101,7 +101,8 @@ all: $(OBJDIR)\solvespace.exe
|
||||||
@echo solvespace.exe
|
@echo solvespace.exe
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rmdir /s /q $(OBJDIR)
|
-del /Q obj\*
|
||||||
|
-rmdir $(OBJDIR)
|
||||||
|
|
||||||
$(OBJDIR)\solvespace.exe: $(SSOBJS) $(SRFOBJS) $(W32OBJS) $(RES)
|
$(OBJDIR)\solvespace.exe: $(SSOBJS) $(SRFOBJS) $(W32OBJS) $(RES)
|
||||||
$(CXX) $(DEFINES) $(CXXFLAGS) /Fe$(OBJDIR)\solvespace.exe $(SSOBJS) $(SRFOBJS) $(W32OBJS) $(RES) $(LIBS)
|
$(CXX) $(DEFINES) $(CXXFLAGS) /Fe$(OBJDIR)\solvespace.exe $(SSOBJS) $(SRFOBJS) $(W32OBJS) $(RES) $(LIBS)
|
||||||
|
@ -132,10 +133,10 @@ $(OBJDIR)\toolbar.obj: src\icons.h
|
||||||
!IFDEF PERL
|
!IFDEF PERL
|
||||||
|
|
||||||
src\icons.h: src\icons\*.png src\png2c.pl
|
src\icons.h: src\icons\*.png src\png2c.pl
|
||||||
$(PERL) src\png2c.pl $@ src\icons-proto.h
|
$(PERL) src\png2c.pl $@ src\icons-proto.h src
|
||||||
|
|
||||||
src\bitmapextra.table.h: src\icons\*.png src\pngchar2c.pl
|
src\bitmapextra.table.h: src\icons\*.png src\pngchar2c.pl
|
||||||
$(PERL) src\pngchar2c.pl >$@.tmp
|
$(PERL) src\pngchar2c.pl src >$@.tmp
|
||||||
move /y $@.tmp $@
|
move /y $@.tmp $@
|
||||||
|
|
||||||
!ELSE IF EXIST(src\built)
|
!ELSE IF EXIST(src\built)
|
||||||
|
|
|
@ -25,6 +25,7 @@ void CnfFreezeInt(uint32_t v, const char *name)
|
||||||
uint32_t CnfThawInt(uint32_t v, const char *name)
|
uint32_t CnfThawInt(uint32_t v, const char *name)
|
||||||
{
|
{
|
||||||
abort();
|
abort();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoMessageBox(const char *str, int rows, int cols, bool error)
|
void DoMessageBox(const char *str, int rows, int cols, bool error)
|
||||||
|
|
|
@ -220,7 +220,7 @@ void SolveSpace::SaveUsingTable(int type) {
|
||||||
int fmt = SAVED[i].fmt;
|
int fmt = SAVED[i].fmt;
|
||||||
union SAVEDptr *p = (union SAVEDptr *)SAVED[i].ptr;
|
union SAVEDptr *p = (union SAVEDptr *)SAVED[i].ptr;
|
||||||
// Any items that aren't specified are assumed to be zero
|
// Any items that aren't specified are assumed to be zero
|
||||||
if(fmt == 'N' && p->N.str == '\0') continue;
|
if(fmt == 'N' && p->N.str[0] == '\0') continue;
|
||||||
if(fmt == 'd' && p->d == 0) continue;
|
if(fmt == 'd' && p->d == 0) continue;
|
||||||
if(fmt == 'f' && EXACT(p->f == 0.0)) continue;
|
if(fmt == 'f' && EXACT(p->f == 0.0)) continue;
|
||||||
if(fmt == 'x' && p->x == 0) continue;
|
if(fmt == 'x' && p->x == 0) continue;
|
||||||
|
|
Loading…
Reference in New Issue