summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h
index d303f7c72..25e309f55 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -144,7 +144,7 @@ typedef std::map<std::string,Module*> featurelist;
// useful macros
-#define IS_LOCAL(x) (x->fd > -1)
+#define IS_LOCAL(x) ((x->fd > -1) && (x->fd <= MAX_DESCRIPTORS))
#define IS_REMOTE(x) (x->fd < 0)
#define IS_MODULE_CREATED(x) (x->fd == FD_MAGIC_NUMBER)