mirror of
				https://github.com/eledio-devices/thirdparty-tinyexpr.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	
							
								
								
									
										10
									
								
								tinyexpr.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								tinyexpr.c
									
									
									
									
									
								
							| @@ -149,11 +149,13 @@ static const te_variable *find_builtin(const char *name, int len) { | |||||||
| } | } | ||||||
|  |  | ||||||
| static const te_variable *find_lookup(const state *s, const char *name, int len) { | static const te_variable *find_lookup(const state *s, const char *name, int len) { | ||||||
|     int i; |     int iters; | ||||||
|  |     const te_variable *var; | ||||||
|     if (!s->lookup) return 0; |     if (!s->lookup) return 0; | ||||||
|     for (i = 0; i < s->lookup_len; ++i) { |  | ||||||
|         if (strncmp(name, s->lookup[i].name, len) == 0 && s->lookup[i].name[len] == '\0') { |     for (var = s->lookup, iters = s->lookup_len; iters; ++var, --iters) { | ||||||
|             return s->lookup + i; |         if (strncmp(name, var->name, len) == 0 && var->name[len] == '\0') { | ||||||
|  |             return var; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     return 0; |     return 0; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user