summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--font_service/FontService.cpp2
-rw-r--r--font_service/FontService_8.vcproj2
-rw-r--r--font_service/collection.h11
-rw-r--r--font_service/common.h1
-rw-r--r--font_service/resource.rc2
-rw-r--r--font_service/services.cpp8
6 files changed, 14 insertions, 12 deletions
diff --git a/font_service/FontService.cpp b/font_service/FontService.cpp
index e03e804..05b8aa9 100644
--- a/font_service/FontService.cpp
+++ b/font_service/FontService.cpp
@@ -11,7 +11,7 @@
PLUGININFO pluginInfo={
sizeof(PLUGININFO),
"FontService",
- PLUGIN_MAKE_VERSION(0, 1, 4, 3),
+ PLUGIN_MAKE_VERSION(0, 1, 4, 4),
"Provides a UI for font settings, and services to plugins for font control.",
"S. Ellis",
"mail@scottellis.com.au",
diff --git a/font_service/FontService_8.vcproj b/font_service/FontService_8.vcproj
index f61ac1a..723e5f5 100644
--- a/font_service/FontService_8.vcproj
+++ b/font_service/FontService_8.vcproj
@@ -150,7 +150,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FONTSERVICE_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
- RuntimeLibrary="3"
+ RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="common.h"
AssemblerListingLocation=".\Debug/"
diff --git a/font_service/collection.h b/font_service/collection.h
index d65a024..66dd850 100644
--- a/font_service/collection.h
+++ b/font_service/collection.h
@@ -168,7 +168,7 @@ public:
DynamicArray(unsigned long init = 0, unsigned long inc = 1): Collection<T>(), ar(0), initial(init), limit(init), increment(inc) {
if(limit) ar = (T *)malloc(limit * sizeof(T));
}
- virtual ~DynamicArray() {free(ar);}
+ virtual ~DynamicArray() {if(ar) free(ar);}
virtual void clear() {
Collection<T>::count = 0;
@@ -267,10 +267,11 @@ public:
if ( DynamicArray<T>::ar[i] == val )
{ index = i;
return true;
- } else if (DynamicArray<T>::ar[i] < val)
- low = i+1;
- else
- high = i-1;
+ } else
+ if (DynamicArray<T>::ar[i] < val)
+ low = i+1;
+ else
+ high = i-1;
}
index = low;
diff --git a/font_service/common.h b/font_service/common.h
index 3696419..07b2b68 100644
--- a/font_service/common.h
+++ b/font_service/common.h
@@ -42,6 +42,7 @@
#include <m_clc.h>
#include <m_chat.h>
+#include <m_popup.h>
extern HINSTANCE hInstance;
diff --git a/font_service/resource.rc b/font_service/resource.rc
index fb61593..fce796c 100644
--- a/font_service/resource.rc
+++ b/font_service/resource.rc
@@ -36,7 +36,7 @@ BEGIN
CONTROL "",IDC_FONTCOLOUR,"ColourPicker",WS_TABSTOP,132,154,57,14
PUSHBUTTON "Choose font...",IDC_CHOOSEFONT,208,154,57,14
CTEXT "Select multiple fonts by dragging or by using the control key",IDC_STATIC,135,174,131,16
- COMBOBOX IDC_COLOURLIST,122,23,102,107,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_COLOURLIST,122,23,102,107,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Colours",IDC_STATIC,108,7,184,45
LTEXT "* you may need to restart for the changes to take effect",IDC_STAT_RESTART,113,39,176,8,NOT WS_VISIBLE
PUSHBUTTON "Reset to Default",IDC_BTN_RESET,142,195,117,14,WS_DISABLED | NOT WS_TABSTOP
diff --git a/font_service/services.cpp b/font_service/services.cpp
index c20b3b6..997b42e 100644
--- a/font_service/services.cpp
+++ b/font_service/services.cpp
@@ -81,8 +81,8 @@ bool operator <(const ColourIDW &id1, const ColourIDW &id2) {
bool operator ==(const FontIDW &id1, const FontIDW &id2) {
int db_cmp = strncmp(id1.dbSettingsGroup, id2.dbSettingsGroup, sizeof(id1.dbSettingsGroup));
- if(db_cmp == 0) {
- return true;
+ if(db_cmp != 0) {
+ return false;
}
return wcsncmp(id1.group, id2.group, sizeof(id1.group)) == 0 && id1.order == id2.order && wcsncmp(id1.name, id2.name, sizeof(id1.name)) == 0;
@@ -90,8 +90,8 @@ bool operator ==(const FontIDW &id1, const FontIDW &id2) {
bool operator ==(const ColourIDW &id1, const ColourIDW &id2) {
int db_cmp = strncmp(id1.dbSettingsGroup, id2.dbSettingsGroup, sizeof(id1.dbSettingsGroup));
- if(db_cmp == 0) {
- return true;
+ if(db_cmp != 0) {
+ return false;
}
return wcsncmp(id1.group, id2.group, sizeof(id1.group)) == 0 && id1.order == id2.order && wcsncmp(id1.name, id2.name, sizeof(id1.name)) == 0;