summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjussi2023-04-10 16:05:45 +0300
committerjussi2023-04-10 16:05:45 +0300
commit6938cdbaede7eb63b9bc2adb9e0a93e243e291ee (patch)
tree67f072df6b9a3d2e9b1f5ab7cc47fd5a62ff50f4 /src
parent1cbadf56f33641e85fc634a326c0db6935947c23 (diff)
downloadreilua-enhanced-6938cdbaede7eb63b9bc2adb9e0a93e243e291ee.tar.gz
reilua-enhanced-6938cdbaede7eb63b9bc2adb9e0a93e243e291ee.tar.bz2
reilua-enhanced-6938cdbaede7eb63b9bc2adb9e0a93e243e291ee.zip
LoadShaderFromMemory fix.
Diffstat (limited to 'src')
-rw-r--r--src/core.c7
-rw-r--r--src/textures.c4
2 files changed, 5 insertions, 6 deletions
diff --git a/src/core.c b/src/core.c
index bcc00ee..84b6991 100644
--- a/src/core.c
+++ b/src/core.c
@@ -248,7 +248,7 @@ int lcoreSetWindowMinSize( lua_State *L ) {
}
/*
-> position = RL.GetMonitorPosition( )
+> position = RL.GetMonitorPosition( int monitor )
Get specified monitor position
@@ -1022,18 +1022,17 @@ int lcoreLoadShaderFromMemory( lua_State *L ) {
lua_pushinteger( L, -1 );
return 1;
}
-
char *vs = NULL;
char *fs = NULL;
if ( lua_isstring( L, 1 ) ) {
- size_t vsLen = lua_rawlen( L, 1 );
+ size_t vsLen = lua_rawlen( L, 1 ) + 1;
vs = malloc( vsLen * sizeof( char ) );
strcpy( vs, lua_tostring( L, 1 ) );
}
if ( lua_isstring( L, 2 ) ) {
- size_t fsLen = lua_rawlen( L, 2 );
+ size_t fsLen = lua_rawlen( L, 2 ) + 1;
fs = malloc( fsLen * sizeof( char ) );
strcpy( fs, lua_tostring( L, 2 ) );
diff --git a/src/textures.c b/src/textures.c
index 1797bc7..b96bb5b 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -2531,7 +2531,7 @@ int ltexturesColorAlphaBlend( lua_State *L ) {
}
/*
-> Color = RL.GetColor( unsigned int hexValue )
+> color = RL.GetColor( unsigned int hexValue )
Get Color structure from hexadecimal value
@@ -2552,7 +2552,7 @@ int ltexturesGetColor( lua_State *L ) {
}
/*
-> Color = RL.GetPixelColor( Texture2D texture, Vector2 position )
+> color = RL.GetPixelColor( Texture2D texture, Vector2 position )
Get pixel color from source texture