diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-04-17 11:01:46 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-04-17 11:01:46 +0300 |
commit | c6e8a004a1449fad72c58a7f3db7ab87ec743868 (patch) | |
tree | fbf5747cf363464358e4a3398f6b88c20550144a /intern/gawain | |
parent | 3bc6b831d82724578fc8150d863b54f334db2bf4 (diff) |
Gawain: fix for last commit
Follow-up to 3bc6b831d82724578fc8150d863b54f334db2bf4
Initial code was getting the number of ShaderInterfaces that could fit between two pointers (which makes no sense). I really meant number of bytes.
Surprised it worked on Mac, glad I tested on Windows before bed :D
Diffstat (limited to 'intern/gawain')
-rw-r--r-- | intern/gawain/src/shader_interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/gawain/src/shader_interface.c b/intern/gawain/src/shader_interface.c index d5c78a4bbf0..fe175d5e45b 100644 --- a/intern/gawain/src/shader_interface.c +++ b/intern/gawain/src/shader_interface.c @@ -204,7 +204,7 @@ ShaderInterface* ShaderInterface_create(GLint program) // realloc shaderface to shrink name buffer ShaderInterface* orig_pointer = shaderface; shaderface = realloc(shaderface, offsetof(ShaderInterface, inputs) + input_ct * sizeof(ShaderInput) + name_buffer_used); - const ptrdiff_t delta = shaderface - orig_pointer; + const ptrdiff_t delta = (char*)shaderface - (char*)orig_pointer; if (delta) { |