summaryrefslogtreecommitdiffhomepage
path: root/src/blitter
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-07-30 21:21:21 +0000
committermidipix <writeonce@midipix.org>2017-07-31 08:43:34 -0400
commit7e3ebda55a15849f5cc1e7ab53edfeedd9fae635 (patch)
treeb98ebf1e21ec39370065ff5ff02448fcd6551d93 /src/blitter
parentb1f553fc960f01e3884d90e4c7ef901ff32d51f1 (diff)
downloadntapi-7e3ebda55a15849f5cc1e7ab53edfeedd9fae635.tar.bz2
ntapi-7e3ebda55a15849f5cc1e7ab53edfeedd9fae635.tar.xz
__ntapi_blt_alloc(): properly support user-provided block array regions.
Diffstat (limited to 'src/blitter')
-rw-r--r--src/blitter/ntapi_blt_alloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/blitter/ntapi_blt_alloc.c b/src/blitter/ntapi_blt_alloc.c
index 5508166..92a84e9 100644
--- a/src/blitter/ntapi_blt_alloc.c
+++ b/src/blitter/ntapi_blt_alloc.c
@@ -37,7 +37,10 @@ int32_t __fastcall __ntapi_blt_alloc(
size_t ptrs,i;
/* alignment */
- if ((params->block_size % sizeof(uintptr_t)) || (params->block_count % sizeof(uintptr_t)))
+ if (params->block_count % sizeof(uintptr_t))
+ return NT_STATUS_INVALID_PARAMETER;
+
+ else if (!params->region && (params->block_size % sizeof(uintptr_t)))
return NT_STATUS_INVALID_PARAMETER;
/* blt control block allocation */